Просмотр исходного кода

fix(compiler-core): add `\r` to accepted chars after end tag name (#1515)

fix #1476
Jack Robertson 5 лет назад
Родитель
Сommit
64e2f46436
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/compiler-core/src/parse.ts

+ 1 - 1
packages/compiler-core/src/parse.ts

@@ -950,6 +950,6 @@ function startsWithEndTagOpen(source: string, tag: string): boolean {
   return (
     startsWith(source, '</') &&
     source.substr(2, tag.length).toLowerCase() === tag.toLowerCase() &&
-    /[\t\n\f />]/.test(source[2 + tag.length] || '>')
+    /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')
   )
 }