ソースを参照

allow script tags

Evan You 10 年 前
コミット
20200de577
2 ファイル変更2 行追加2 行削除
  1. 1 1
      src/compiler/parser/html-parser.js
  2. 1 1
      src/compiler/parser/index.js

+ 1 - 1
src/compiler/parser/html-parser.js

@@ -182,7 +182,7 @@ export function parseHTML (html, handler) {
     }
 
     if (html === last) {
-      throw new Error('Parse Error: ' + html)
+      throw new Error('Error parsing template:\n\n' + html)
     }
   }
 

+ 1 - 1
src/compiler/parser/index.js

@@ -145,7 +145,7 @@ export function parse (template, options) {
           `Component template should contain exactly one root element:\n\n${template}`
         )
       }
-      if (currentParent && tag !== 'script') {
+      if (currentParent) {
         if (element.else) {
           processElse(element, currentParent)
         } else {