From ea5338ac68882ba3e32794af18daa27e76e6370c Mon Sep 17 00:00:00 2001 From: mrkishi Date: Fri, 13 May 2022 23:01:29 -0300 Subject: [PATCH] misc lint --- src/runtime/internal/ssr.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/internal/ssr.ts b/src/runtime/internal/ssr.ts index a0bfae21ac..dc4c16dffb 100644 --- a/src/runtime/internal/ssr.ts +++ b/src/runtime/internal/ssr.ts @@ -85,12 +85,12 @@ export function escape(value: unknown, is_attr = false) { let escaped = ''; let last = 0; - while (pattern.test(str)) { - const i = pattern.lastIndex - 1; - const ch = str[i]; - escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<')); - last = i + 1; - } + while (pattern.test(str)) { + const i = pattern.lastIndex - 1; + const ch = str[i]; + escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '"' ? '"' : '<')); + last = i + 1; + } return escaped + str.substring(last); }