]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler): support full range of entity decoding in browser builds
authorEvan You <yyx990803@gmail.com>
Wed, 8 Apr 2020 22:51:25 +0000 (18:51 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 8 Apr 2020 22:51:25 +0000 (18:51 -0400)
BREAKING CHANGE: compiler options have been adjusted.
    - new option `decodeEntities` is added.
    - `namedCharacterReferences` option has been removed.
    - `maxCRNameLength` option has been rmeoved.

packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap
packages/compiler-core/__tests__/parse.spec.ts
packages/compiler-core/src/errors.ts
packages/compiler-core/src/options.ts
packages/compiler-core/src/parse.ts
packages/compiler-dom/__tests__/parse.spec.ts
packages/compiler-dom/src/decodeHtml.ts [new file with mode: 0644]
packages/compiler-dom/src/decodeHtmlBrowser.ts [new file with mode: 0644]
packages/compiler-dom/src/index.ts
packages/compiler-dom/src/parserOptions.ts [moved from packages/compiler-dom/src/parserOptionsMinimal.ts with 92% similarity]
packages/compiler-dom/src/parserOptionsStandard.ts [deleted file]

index c7af84fff73299e5002905f0218314f8a5c6da74..998b00ab7b924ea66adf3aa91af7335ceacd01b8 100644 (file)
@@ -210,1181 +210,28 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template attr="&#99;"></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 35,
-          "line": 1,
-          "offset": 34,
-        },
-        "source": "<template attr=\\"&#99;\\"></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [
-        Object {
-          "loc": Object {
-            "end": Object {
-              "column": 23,
-              "line": 1,
-              "offset": 22,
-            },
-            "source": "attr=\\"&#99;\\"",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "name": "attr",
-          "type": 6,
-          "value": Object {
-            "content": "c",
-            "loc": Object {
-              "end": Object {
-                "column": 23,
-                "line": 1,
-                "offset": 22,
-              },
-              "source": "\\"&#99;\\"",
-              "start": Object {
-                "column": 16,
-                "line": 1,
-                "offset": 15,
-              },
-            },
-            "type": 2,
-          },
-        },
-      ],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 35,
-      "line": 1,
-      "offset": 34,
-    },
-    "source": "<template attr=\\"&#99;\\"></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template attr="&#a;"></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 34,
-          "line": 1,
-          "offset": 33,
-        },
-        "source": "<template attr=\\"&#a;\\"></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [
-        Object {
-          "loc": Object {
-            "end": Object {
-              "column": 22,
-              "line": 1,
-              "offset": 21,
-            },
-            "source": "attr=\\"&#a;\\"",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "name": "attr",
-          "type": 6,
-          "value": Object {
-            "content": "&#a;",
-            "loc": Object {
-              "end": Object {
-                "column": 22,
-                "line": 1,
-                "offset": 21,
-              },
-              "source": "\\"&#a;\\"",
-              "start": Object {
-                "column": 16,
-                "line": 1,
-                "offset": 15,
-              },
-            },
-            "type": 2,
-          },
-        },
-      ],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 34,
-      "line": 1,
-      "offset": 33,
-    },
-    "source": "<template attr=\\"&#a;\\"></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template attr="&#xff;"></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 36,
-          "line": 1,
-          "offset": 35,
-        },
-        "source": "<template attr=\\"&#xff;\\"></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [
-        Object {
-          "loc": Object {
-            "end": Object {
-              "column": 24,
-              "line": 1,
-              "offset": 23,
-            },
-            "source": "attr=\\"&#xff;\\"",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "name": "attr",
-          "type": 6,
-          "value": Object {
-            "content": "ÿ",
-            "loc": Object {
-              "end": Object {
-                "column": 24,
-                "line": 1,
-                "offset": 23,
-              },
-              "source": "\\"&#xff;\\"",
-              "start": Object {
-                "column": 16,
-                "line": 1,
-                "offset": 15,
-              },
-            },
-            "type": 2,
-          },
-        },
-      ],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 36,
-      "line": 1,
-      "offset": 35,
-    },
-    "source": "<template attr=\\"&#xff;\\"></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template attr="&#xg;"></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 35,
-          "line": 1,
-          "offset": 34,
-        },
-        "source": "<template attr=\\"&#xg;\\"></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [
-        Object {
-          "loc": Object {
-            "end": Object {
-              "column": 23,
-              "line": 1,
-              "offset": 22,
-            },
-            "source": "attr=\\"&#xg;\\"",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "name": "attr",
-          "type": 6,
-          "value": Object {
-            "content": "&#xg;",
-            "loc": Object {
-              "end": Object {
-                "column": 23,
-                "line": 1,
-                "offset": 22,
-              },
-              "source": "\\"&#xg;\\"",
-              "start": Object {
-                "column": 16,
-                "line": 1,
-                "offset": 15,
-              },
-            },
-            "type": 2,
-          },
-        },
-      ],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 35,
-      "line": 1,
-      "offset": 34,
-    },
-    "source": "<template attr=\\"&#xg;\\"></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template>&#99;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "c",
-          "loc": Object {
-            "end": Object {
-              "column": 16,
-              "line": 1,
-              "offset": 15,
-            },
-            "source": "&#99;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 27,
-          "line": 1,
-          "offset": 26,
-        },
-        "source": "<template>&#99;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 27,
-      "line": 1,
-      "offset": 26,
-    },
-    "source": "<template>&#99;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template>&#a;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "&#a;",
-          "loc": Object {
-            "end": Object {
-              "column": 15,
-              "line": 1,
-              "offset": 14,
-            },
-            "source": "&#a;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 26,
-          "line": 1,
-          "offset": 25,
-        },
-        "source": "<template>&#a;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 26,
-      "line": 1,
-      "offset": 25,
-    },
-    "source": "<template>&#a;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template>&#xff;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "ÿ",
-          "loc": Object {
-            "end": Object {
-              "column": 17,
-              "line": 1,
-              "offset": 16,
-            },
-            "source": "&#xff;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 28,
-          "line": 1,
-          "offset": 27,
-        },
-        "source": "<template>&#xff;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 28,
-      "line": 1,
-      "offset": 27,
-    },
-    "source": "<template>&#xff;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE <template>&#xg;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "&#xg;",
-          "loc": Object {
-            "end": Object {
-              "column": 16,
-              "line": 1,
-              "offset": 15,
-            },
-            "source": "&#xg;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 27,
-          "line": 1,
-          "offset": 26,
-        },
-        "source": "<template>&#xg;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 27,
-      "line": 1,
-      "offset": 26,
-    },
-    "source": "<template>&#xg;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT <template><![CDATA[cdata]]></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "[CDATA[cdata]]",
-          "loc": Object {
-            "end": Object {
-              "column": 28,
-              "line": 1,
-              "offset": 27,
-            },
-            "source": "<![CDATA[cdata]]>",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 3,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 39,
-          "line": 1,
-          "offset": 38,
-        },
-        "source": "<template><![CDATA[cdata]]></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 39,
-      "line": 1,
-      "offset": 38,
-    },
-    "source": "<template><![CDATA[cdata]]></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT <template><svg><![CDATA[cdata]]></svg></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "children": Array [
-            Object {
-              "content": "cdata",
-              "loc": Object {
-                "end": Object {
-                  "column": 30,
-                  "line": 1,
-                  "offset": 29,
-                },
-                "source": "cdata",
-                "start": Object {
-                  "column": 25,
-                  "line": 1,
-                  "offset": 24,
-                },
-              },
-              "type": 2,
-            },
-          ],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
-          "loc": Object {
-            "end": Object {
-              "column": 39,
-              "line": 1,
-              "offset": 38,
-            },
-            "source": "<svg><![CDATA[cdata]]></svg>",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "ns": 1,
-          "props": Array [],
-          "tag": "svg",
-          "tagType": 0,
-          "type": 1,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 50,
-          "line": 1,
-          "offset": 49,
-        },
-        "source": "<template><svg><![CDATA[cdata]]></svg></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 50,
-      "line": 1,
-      "offset": 49,
-    },
-    "source": "<template><svg><![CDATA[cdata]]></svg></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE <template>&#1234567;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "�",
-          "loc": Object {
-            "end": Object {
-              "column": 21,
-              "line": 1,
-              "offset": 20,
-            },
-            "source": "&#1234567;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 32,
-          "line": 1,
-          "offset": 31,
-        },
-        "source": "<template>&#1234567;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 32,
-      "line": 1,
-      "offset": 31,
-    },
-    "source": "<template>&#1234567;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE <template>&#0003;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "\ 3",
-          "loc": Object {
-            "end": Object {
-              "column": 18,
-              "line": 1,
-              "offset": 17,
-            },
-            "source": "&#0003;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 29,
-          "line": 1,
-          "offset": 28,
-        },
-        "source": "<template>&#0003;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 29,
-      "line": 1,
-      "offset": 28,
-    },
-    "source": "<template>&#0003;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE <template>&#x7F;</template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "\7f",
-          "loc": Object {
-            "end": Object {
-              "column": 17,
-              "line": 1,
-              "offset": 16,
-            },
-            "source": "&#x7F;",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 28,
-          "line": 1,
-          "offset": 27,
-        },
-        "source": "<template>&#x7F;</template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 28,
-      "line": 1,
-      "offset": 27,
-    },
-    "source": "<template>&#x7F;</template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors DUPLICATE_ATTRIBUTE <template><div id="" id=""></div></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
-          "loc": Object {
-            "end": Object {
-              "column": 34,
-              "line": 1,
-              "offset": 33,
-            },
-            "source": "<div id=\\"\\" id=\\"\\"></div>",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 21,
-                  "line": 1,
-                  "offset": 20,
-                },
-                "source": "id=\\"\\"",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "",
-                "loc": Object {
-                  "end": Object {
-                    "column": 21,
-                    "line": 1,
-                    "offset": 20,
-                  },
-                  "source": "\\"\\"",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
-            },
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 27,
-                  "line": 1,
-                  "offset": 26,
-                },
-                "source": "id=\\"\\"",
-                "start": Object {
-                  "column": 22,
-                  "line": 1,
-                  "offset": 21,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "",
-                "loc": Object {
-                  "end": Object {
-                    "column": 27,
-                    "line": 1,
-                    "offset": 26,
-                  },
-                  "source": "\\"\\"",
-                  "start": Object {
-                    "column": 25,
-                    "line": 1,
-                    "offset": 24,
-                  },
-                },
-                "type": 2,
-              },
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 45,
-          "line": 1,
-          "offset": 44,
-        },
-        "source": "<template><div id=\\"\\" id=\\"\\"></div></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 45,
-      "line": 1,
-      "offset": 44,
-    },
-    "source": "<template><div id=\\"\\" id=\\"\\"></div></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors END_TAG_WITH_ATTRIBUTES <template><div></div id=""></template> 1`] = `
+exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT <template><![CDATA[cdata]]></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "[CDATA[cdata]]",
           "loc": Object {
             "end": Object {
               "column": 28,
               "line": 1,
               "offset": 27,
             },
-            "source": "<div></div id=\\"\\">",
+            "source": "<![CDATA[cdata]]>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
@@ -1395,7 +242,7 @@ Object {
           "line": 1,
           "offset": 38,
         },
-        "source": "<template><div></div id=\\"\\"></template>",
+        "source": "<template><![CDATA[cdata]]></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1421,7 +268,7 @@ Object {
       "line": 1,
       "offset": 38,
     },
-    "source": "<template><div></div id=\\"\\"></template>",
+    "source": "<template><![CDATA[cdata]]></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1433,32 +280,50 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors END_TAG_WITH_TRAILING_SOLIDUS <template><div></div/></template> 1`] = `
+exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT <template><svg><![CDATA[cdata]]></svg></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
+          "children": Array [
+            Object {
+              "content": "cdata",
+              "loc": Object {
+                "end": Object {
+                  "column": 30,
+                  "line": 1,
+                  "offset": 29,
+                },
+                "source": "cdata",
+                "start": Object {
+                  "column": 25,
+                  "line": 1,
+                  "offset": 24,
+                },
+              },
+              "type": 2,
+            },
+          ],
           "codegenNode": undefined,
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 23,
+              "column": 39,
               "line": 1,
-              "offset": 22,
+              "offset": 38,
             },
-            "source": "<div></div/>",
+            "source": "<svg><![CDATA[cdata]]></svg>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
+          "ns": 1,
           "props": Array [],
-          "tag": "div",
+          "tag": "svg",
           "tagType": 0,
           "type": 1,
         },
@@ -1467,151 +332,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 34,
-          "line": 1,
-          "offset": 33,
-        },
-        "source": "<template><div></div/></template>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 34,
-      "line": 1,
-      "offset": 33,
-    },
-    "source": "<template><div></div/></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME <template>< 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "<",
-          "loc": Object {
-            "end": Object {
-              "column": 12,
-              "line": 1,
-              "offset": 11,
-            },
-            "source": "<",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 12,
-          "line": 1,
-          "offset": 11,
-        },
-        "source": "<template><",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 12,
-      "line": 1,
-      "offset": 11,
-    },
-    "source": "<template><",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME <template></ 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "</",
-          "loc": Object {
-            "end": Object {
-              "column": 13,
-              "line": 1,
-              "offset": 12,
-            },
-            "source": "</",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 13,
+          "column": 50,
           "line": 1,
-          "offset": 12,
+          "offset": 49,
         },
-        "source": "<template></",
+        "source": "<template><svg><![CDATA[cdata]]></svg></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1633,11 +358,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 13,
+      "column": 50,
       "line": 1,
-      "offset": 12,
+      "offset": 49,
     },
-    "source": "<template></",
+    "source": "<template><svg><![CDATA[cdata]]></svg></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1649,7 +374,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_CDATA <template><svg><![CDATA[ 1`] = `
+exports[`compiler: parse Errors DUPLICATE_ATTRIBUTE <template><div id="" id=""></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -1661,20 +386,89 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 25,
+              "column": 34,
               "line": 1,
-              "offset": 24,
+              "offset": 33,
             },
-            "source": "<svg><![CDATA[",
+            "source": "<div id=\\"\\" id=\\"\\"></div>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 1,
-          "props": Array [],
-          "tag": "svg",
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 21,
+                  "line": 1,
+                  "offset": 20,
+                },
+                "source": "id=\\"\\"",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "",
+                "loc": Object {
+                  "end": Object {
+                    "column": 21,
+                    "line": 1,
+                    "offset": 20,
+                  },
+                  "source": "\\"\\"",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 27,
+                  "line": 1,
+                  "offset": 26,
+                },
+                "source": "id=\\"\\"",
+                "start": Object {
+                  "column": 22,
+                  "line": 1,
+                  "offset": 21,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "",
+                "loc": Object {
+                  "end": Object {
+                    "column": 27,
+                    "line": 1,
+                    "offset": 26,
+                  },
+                  "source": "\\"\\"",
+                  "start": Object {
+                    "column": 25,
+                    "line": 1,
+                    "offset": 24,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
           "tagType": 0,
           "type": 1,
         },
@@ -1683,11 +477,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 25,
+          "column": 45,
           "line": 1,
-          "offset": 24,
+          "offset": 44,
         },
-        "source": "<template><svg><![CDATA[",
+        "source": "<template><div id=\\"\\" id=\\"\\"></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1709,11 +503,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 25,
+      "column": 45,
       "line": 1,
-      "offset": 24,
+      "offset": 44,
     },
-    "source": "<template><svg><![CDATA[",
+    "source": "<template><div id=\\"\\" id=\\"\\"></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1725,50 +519,32 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_CDATA <template><svg><![CDATA[cdata 1`] = `
+exports[`compiler: parse Errors END_TAG_WITH_ATTRIBUTES <template><div></div id=""></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [
-            Object {
-              "content": "cdata",
-              "loc": Object {
-                "end": Object {
-                  "column": 30,
-                  "line": 1,
-                  "offset": 29,
-                },
-                "source": "cdata",
-                "start": Object {
-                  "column": 25,
-                  "line": 1,
-                  "offset": 24,
-                },
-              },
-              "type": 2,
-            },
-          ],
+          "children": Array [],
           "codegenNode": undefined,
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 30,
+              "column": 28,
               "line": 1,
-              "offset": 29,
+              "offset": 27,
             },
-            "source": "<svg><![CDATA[cdata",
+            "source": "<div></div id=\\"\\">",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 1,
+          "ns": 0,
           "props": Array [],
-          "tag": "svg",
+          "tag": "div",
           "tagType": 0,
           "type": 1,
         },
@@ -1777,11 +553,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 30,
+          "column": 39,
           "line": 1,
-          "offset": 29,
+          "offset": 38,
         },
-        "source": "<template><svg><![CDATA[cdata",
+        "source": "<template><div></div id=\\"\\"></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1803,11 +579,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 30,
+      "column": 39,
       "line": 1,
-      "offset": 29,
+      "offset": 38,
     },
-    "source": "<template><svg><![CDATA[cdata",
+    "source": "<template><div></div id=\\"\\"></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1819,39 +595,45 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_COMMENT <template><! 1`] = `
+exports[`compiler: parse Errors END_TAG_WITH_TRAILING_SOLIDUS <template><div></div/></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 13,
+              "column": 23,
               "line": 1,
-              "offset": 12,
+              "offset": 22,
             },
-            "source": "<!",
+            "source": "<div></div/>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 13,
+          "column": 34,
           "line": 1,
-          "offset": 12,
+          "offset": 33,
         },
-        "source": "<template><!",
+        "source": "<template><div></div/></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1873,11 +655,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 13,
+      "column": 34,
       "line": 1,
-      "offset": 12,
+      "offset": 33,
     },
-    "source": "<template><!",
+    "source": "<template><div></div/></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1889,39 +671,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_COMMENT <template><!- 1`] = `
+exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME <template>< 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "-",
+          "content": "<",
           "loc": Object {
             "end": Object {
-              "column": 14,
+              "column": 12,
               "line": 1,
-              "offset": 13,
+              "offset": 11,
             },
-            "source": "<!-",
+            "source": "<",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "type": 2,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 14,
+          "column": 12,
           "line": 1,
-          "offset": 13,
+          "offset": 11,
         },
-        "source": "<template><!-",
+        "source": "<template><",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -1943,11 +725,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 14,
+      "column": 12,
       "line": 1,
-      "offset": 13,
+      "offset": 11,
     },
-    "source": "<template><!-",
+    "source": "<template><",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -1959,39 +741,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_COMMENT <template><!-- 1`] = `
+exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME <template></ 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "content": "</",
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 13,
               "line": 1,
-              "offset": 14,
+              "offset": 12,
             },
-            "source": "<!--",
+            "source": "</",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "type": 2,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 15,
+          "column": 13,
           "line": 1,
-          "offset": 14,
+          "offset": 12,
         },
-        "source": "<template><!--",
+        "source": "<template></",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2013,11 +795,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 15,
+      "column": 13,
       "line": 1,
-      "offset": 14,
+      "offset": 12,
     },
-    "source": "<template><!--",
+    "source": "<template></",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2029,39 +811,45 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_COMMENT <template><!--comment 1`] = `
+exports[`compiler: parse Errors EOF_IN_CDATA <template><svg><![CDATA[ 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "comment",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 22,
+              "column": 25,
               "line": 1,
-              "offset": 21,
+              "offset": 24,
             },
-            "source": "<!--comment",
+            "source": "<svg><![CDATA[",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 1,
+          "props": Array [],
+          "tag": "svg",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 22,
+          "column": 25,
           "line": 1,
-          "offset": 21,
+          "offset": 24,
         },
-        "source": "<template><!--comment",
+        "source": "<template><svg><![CDATA[",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2083,11 +871,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 22,
+      "column": 25,
       "line": 1,
-      "offset": 21,
+      "offset": 24,
     },
-    "source": "<template><!--comment",
+    "source": "<template><svg><![CDATA[",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2099,39 +887,63 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_COMMENT <template><!abc 1`] = `
+exports[`compiler: parse Errors EOF_IN_CDATA <template><svg><![CDATA[cdata 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "abc",
+          "children": Array [
+            Object {
+              "content": "cdata",
+              "loc": Object {
+                "end": Object {
+                  "column": 30,
+                  "line": 1,
+                  "offset": 29,
+                },
+                "source": "cdata",
+                "start": Object {
+                  "column": 25,
+                  "line": 1,
+                  "offset": 24,
+                },
+              },
+              "type": 2,
+            },
+          ],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 16,
+              "column": 30,
               "line": 1,
-              "offset": 15,
+              "offset": 29,
             },
-            "source": "<!abc",
+            "source": "<svg><![CDATA[cdata",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 1,
+          "props": Array [],
+          "tag": "svg",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 16,
+          "column": 30,
           "line": 1,
-          "offset": 15,
+          "offset": 29,
         },
-        "source": "<template><!abc",
+        "source": "<template><svg><![CDATA[cdata",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2153,11 +965,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 16,
+      "column": 30,
       "line": 1,
-      "offset": 15,
+      "offset": 29,
     },
-    "source": "<template><!abc",
+    "source": "<template><svg><![CDATA[cdata",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2169,39 +981,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT <script><!--console.log('hello') 1`] = `
+exports[`compiler: parse Errors EOF_IN_COMMENT <template><! 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "<!--console.log('hello')",
+          "content": "",
           "loc": Object {
             "end": Object {
-              "column": 33,
+              "column": 13,
               "line": 1,
-              "offset": 32,
+              "offset": 12,
             },
-            "source": "<!--console.log('hello')",
+            "source": "<!",
             "start": Object {
-              "column": 9,
+              "column": 11,
               "line": 1,
-              "offset": 8,
+              "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 33,
+          "column": 13,
           "line": 1,
-          "offset": 32,
+          "offset": 12,
         },
-        "source": "<script><!--console.log('hello')",
+        "source": "<template><!",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2210,7 +1022,7 @@ Object {
       },
       "ns": 0,
       "props": Array [],
-      "tag": "script",
+      "tag": "template",
       "tagType": 0,
       "type": 1,
     },
@@ -2223,11 +1035,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 33,
+      "column": 13,
       "line": 1,
-      "offset": 32,
+      "offset": 12,
     },
-    "source": "<script><!--console.log('hello')",
+    "source": "<template><!",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2239,39 +1051,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT <script>console.log('hello') 1`] = `
+exports[`compiler: parse Errors EOF_IN_COMMENT <template><!- 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "console.log('hello')",
+          "content": "-",
           "loc": Object {
             "end": Object {
-              "column": 29,
+              "column": 14,
               "line": 1,
-              "offset": 28,
+              "offset": 13,
             },
-            "source": "console.log('hello')",
+            "source": "<!-",
             "start": Object {
-              "column": 9,
+              "column": 11,
               "line": 1,
-              "offset": 8,
+              "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 29,
+          "column": 14,
           "line": 1,
-          "offset": 28,
+          "offset": 13,
         },
-        "source": "<script>console.log('hello')",
+        "source": "<template><!-",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2280,7 +1092,7 @@ Object {
       },
       "ns": 0,
       "props": Array [],
-      "tag": "script",
+      "tag": "template",
       "tagType": 0,
       "type": 1,
     },
@@ -2293,11 +1105,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 29,
+      "column": 14,
       "line": 1,
-      "offset": 28,
+      "offset": 13,
     },
-    "source": "<script>console.log('hello')",
+    "source": "<template><!-",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2309,45 +1121,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div  1`] = `
+exports[`compiler: parse Errors EOF_IN_COMMENT <template><!-- 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "",
           "loc": Object {
             "end": Object {
-              "column": 16,
+              "column": 15,
               "line": 1,
-              "offset": 15,
+              "offset": 14,
             },
-            "source": "<div ",
+            "source": "<!--",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 16,
+          "column": 15,
           "line": 1,
-          "offset": 15,
+          "offset": 14,
         },
-        "source": "<template><div ",
+        "source": "<template><!--",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2369,11 +1175,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 16,
+      "column": 15,
       "line": 1,
-      "offset": 15,
+      "offset": 14,
     },
-    "source": "<template><div ",
+    "source": "<template><!--",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2385,45 +1191,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div 1`] = `
+exports[`compiler: parse Errors EOF_IN_COMMENT <template><!--comment 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "comment",
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 22,
               "line": 1,
-              "offset": 14,
+              "offset": 21,
             },
-            "source": "<div",
+            "source": "<!--comment",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 15,
+          "column": 22,
           "line": 1,
-          "offset": 14,
+          "offset": 21,
         },
-        "source": "<template><div",
+        "source": "<template><!--comment",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2445,11 +1245,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 15,
+      "column": 22,
       "line": 1,
-      "offset": 14,
+      "offset": 21,
     },
-    "source": "<template><div",
+    "source": "<template><!--comment",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2461,64 +1261,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id  1`] = `
+exports[`compiler: parse Errors EOF_IN_COMMENT <template><!abc 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "abc",
           "loc": Object {
             "end": Object {
-              "column": 19,
+              "column": 16,
               "line": 1,
-              "offset": 18,
+              "offset": 15,
             },
-            "source": "<div id ",
+            "source": "<!abc",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 18,
-                  "line": 1,
-                  "offset": 17,
-                },
-                "source": "id",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": undefined,
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 19,
+          "column": 16,
           "line": 1,
-          "offset": 18,
+          "offset": 15,
         },
-        "source": "<template><div id ",
+        "source": "<template><!abc",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2540,11 +1315,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 19,
+      "column": 16,
       "line": 1,
-      "offset": 18,
+      "offset": 15,
     },
-    "source": "<template><div id ",
+    "source": "<template><!abc",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2556,64 +1331,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id = 1`] = `
+exports[`compiler: parse Errors EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT <script><!--console.log('hello') 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "<!--console.log('hello')",
           "loc": Object {
             "end": Object {
-              "column": 20,
+              "column": 33,
               "line": 1,
-              "offset": 19,
+              "offset": 32,
             },
-            "source": "<div id =",
+            "source": "<!--console.log('hello')",
             "start": Object {
-              "column": 11,
+              "column": 9,
               "line": 1,
-              "offset": 10,
+              "offset": 8,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 20,
-                  "line": 1,
-                  "offset": 19,
-                },
-                "source": "id =",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": undefined,
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 2,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 20,
+          "column": 33,
           "line": 1,
-          "offset": 19,
+          "offset": 32,
         },
-        "source": "<template><div id =",
+        "source": "<script><!--console.log('hello')",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2622,7 +1372,7 @@ Object {
       },
       "ns": 0,
       "props": Array [],
-      "tag": "template",
+      "tag": "script",
       "tagType": 0,
       "type": 1,
     },
@@ -2635,11 +1385,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 20,
+      "column": 33,
       "line": 1,
-      "offset": 19,
+      "offset": 32,
     },
-    "source": "<template><div id =",
+    "source": "<script><!--console.log('hello')",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2651,64 +1401,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id 1`] = `
+exports[`compiler: parse Errors EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT <script>console.log('hello') 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "console.log('hello')",
           "loc": Object {
             "end": Object {
-              "column": 18,
+              "column": 29,
               "line": 1,
-              "offset": 17,
+              "offset": 28,
             },
-            "source": "<div id",
+            "source": "console.log('hello')",
             "start": Object {
-              "column": 11,
+              "column": 9,
               "line": 1,
-              "offset": 10,
+              "offset": 8,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 18,
-                  "line": 1,
-                  "offset": 17,
-                },
-                "source": "id",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": undefined,
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 2,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 18,
+          "column": 29,
           "line": 1,
-          "offset": 17,
+          "offset": 28,
         },
-        "source": "<template><div id",
+        "source": "<script>console.log('hello')",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2717,7 +1442,7 @@ Object {
       },
       "ns": 0,
       "props": Array [],
-      "tag": "template",
+      "tag": "script",
       "tagType": 0,
       "type": 1,
     },
@@ -2730,11 +1455,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 18,
+      "column": 29,
       "line": 1,
-      "offset": 17,
+      "offset": 28,
     },
-    "source": "<template><div id",
+    "source": "<script>console.log('hello')",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2746,7 +1471,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div  1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -2758,11 +1483,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 23,
+              "column": 16,
               "line": 1,
-              "offset": 22,
+              "offset": 15,
             },
-            "source": "<div id=\\"abc",
+            "source": "<div ",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -2770,42 +1495,7 @@ Object {
             },
           },
           "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 23,
-                  "line": 1,
-                  "offset": 22,
-                },
-                "source": "id=\\"abc",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "abc",
-                "loc": Object {
-                  "end": Object {
-                    "column": 23,
-                    "line": 1,
-                    "offset": 22,
-                  },
-                  "source": "\\"abc",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
-            },
-          ],
+          "props": Array [],
           "tag": "div",
           "tagType": 0,
           "type": 1,
@@ -2815,11 +1505,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 23,
+          "column": 16,
           "line": 1,
-          "offset": 22,
+          "offset": 15,
         },
-        "source": "<template><div id=\\"abc",
+        "source": "<template><div ",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2841,11 +1531,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 23,
+      "column": 16,
       "line": 1,
-      "offset": 22,
+      "offset": 15,
     },
-    "source": "<template><div id=\\"abc",
+    "source": "<template><div ",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2857,7 +1547,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc" 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -2869,11 +1559,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 24,
+              "column": 15,
               "line": 1,
-              "offset": 23,
+              "offset": 14,
             },
-            "source": "<div id=\\"abc\\"",
+            "source": "<div",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -2881,42 +1571,7 @@ Object {
             },
           },
           "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 24,
-                  "line": 1,
-                  "offset": 23,
-                },
-                "source": "id=\\"abc\\"",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "abc",
-                "loc": Object {
-                  "end": Object {
-                    "column": 24,
-                    "line": 1,
-                    "offset": 23,
-                  },
-                  "source": "\\"abc\\"",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
-            },
-          ],
+          "props": Array [],
           "tag": "div",
           "tagType": 0,
           "type": 1,
@@ -2926,11 +1581,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 24,
+          "column": 15,
           "line": 1,
-          "offset": 23,
+          "offset": 14,
         },
-        "source": "<template><div id=\\"abc\\"",
+        "source": "<template><div",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -2952,11 +1607,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 24,
+      "column": 15,
       "line": 1,
-      "offset": 23,
+      "offset": 14,
     },
-    "source": "<template><div id=\\"abc\\"",
+    "source": "<template><div",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -2968,7 +1623,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc"/ 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id  1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -2980,11 +1635,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 25,
+              "column": 19,
               "line": 1,
-              "offset": 24,
+              "offset": 18,
             },
-            "source": "<div id=\\"abc\\"/",
+            "source": "<div id ",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -2996,11 +1651,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 24,
+                  "column": 18,
                   "line": 1,
-                  "offset": 23,
+                  "offset": 17,
                 },
-                "source": "id=\\"abc\\"",
+                "source": "id",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -3009,23 +1664,7 @@ Object {
               },
               "name": "id",
               "type": 6,
-              "value": Object {
-                "content": "abc",
-                "loc": Object {
-                  "end": Object {
-                    "column": 24,
-                    "line": 1,
-                    "offset": 23,
-                  },
-                  "source": "\\"abc\\"",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
+              "value": undefined,
             },
           ],
           "tag": "div",
@@ -3037,11 +1676,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 25,
+          "column": 19,
           "line": 1,
-          "offset": 24,
+          "offset": 18,
         },
-        "source": "<template><div id=\\"abc\\"/",
+        "source": "<template><div id ",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3063,11 +1702,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 25,
+      "column": 19,
       "line": 1,
-      "offset": 24,
+      "offset": 18,
     },
-    "source": "<template><div id=\\"abc\\"/",
+    "source": "<template><div id ",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3079,7 +1718,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id = 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -3091,11 +1730,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 23,
+              "column": 20,
               "line": 1,
-              "offset": 22,
+              "offset": 19,
             },
-            "source": "<div id='abc",
+            "source": "<div id =",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -3107,36 +1746,20 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 23,
+                  "column": 20,
                   "line": 1,
-                  "offset": 22,
+                  "offset": 19,
                 },
-                "source": "id='abc",
+                "source": "id =",
                 "start": Object {
                   "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "abc",
-                "loc": Object {
-                  "end": Object {
-                    "column": 23,
-                    "line": 1,
-                    "offset": 22,
-                  },
-                  "source": "'abc",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
+                  "line": 1,
+                  "offset": 15,
                 },
-                "type": 2,
               },
+              "name": "id",
+              "type": 6,
+              "value": undefined,
             },
           ],
           "tag": "div",
@@ -3148,11 +1771,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 23,
+          "column": 20,
           "line": 1,
-          "offset": 22,
+          "offset": 19,
         },
-        "source": "<template><div id='abc",
+        "source": "<template><div id =",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3174,11 +1797,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 23,
+      "column": 20,
       "line": 1,
-      "offset": 22,
+      "offset": 19,
     },
-    "source": "<template><div id='abc",
+    "source": "<template><div id =",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3190,7 +1813,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc' 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -3202,11 +1825,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 24,
+              "column": 18,
               "line": 1,
-              "offset": 23,
+              "offset": 17,
             },
-            "source": "<div id='abc'",
+            "source": "<div id",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -3218,11 +1841,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 24,
+                  "column": 18,
                   "line": 1,
-                  "offset": 23,
+                  "offset": 17,
                 },
-                "source": "id='abc'",
+                "source": "id",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -3231,23 +1854,7 @@ Object {
               },
               "name": "id",
               "type": 6,
-              "value": Object {
-                "content": "abc",
-                "loc": Object {
-                  "end": Object {
-                    "column": 24,
-                    "line": 1,
-                    "offset": 23,
-                  },
-                  "source": "'abc'",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
+              "value": undefined,
             },
           ],
           "tag": "div",
@@ -3259,11 +1866,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 24,
+          "column": 18,
           "line": 1,
-          "offset": 23,
+          "offset": 17,
         },
-        "source": "<template><div id='abc'",
+        "source": "<template><div id",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3285,11 +1892,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 24,
+      "column": 18,
       "line": 1,
-      "offset": 23,
+      "offset": 17,
     },
-    "source": "<template><div id='abc'",
+    "source": "<template><div id",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3301,7 +1908,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc'/ 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -3313,11 +1920,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 25,
+              "column": 23,
               "line": 1,
-              "offset": 24,
+              "offset": 22,
             },
-            "source": "<div id='abc'/",
+            "source": "<div id=\\"abc",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -3329,11 +1936,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 24,
+                  "column": 23,
                   "line": 1,
-                  "offset": 23,
+                  "offset": 22,
                 },
-                "source": "id='abc'",
+                "source": "id=\\"abc",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -3346,11 +1953,11 @@ Object {
                 "content": "abc",
                 "loc": Object {
                   "end": Object {
-                    "column": 24,
+                    "column": 23,
                     "line": 1,
-                    "offset": 23,
+                    "offset": 22,
                   },
-                  "source": "'abc'",
+                  "source": "\\"abc",
                   "start": Object {
                     "column": 19,
                     "line": 1,
@@ -3370,11 +1977,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 25,
+          "column": 23,
           "line": 1,
-          "offset": 24,
+          "offset": 22,
         },
-        "source": "<template><div id='abc'/",
+        "source": "<template><div id=\\"abc",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3396,11 +2003,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 25,
+      "column": 23,
       "line": 1,
-      "offset": 24,
+      "offset": 22,
     },
-    "source": "<template><div id='abc'/",
+    "source": "<template><div id=\\"abc",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3412,7 +2019,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id=abc / 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc" 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -3428,7 +2035,7 @@ Object {
               "line": 1,
               "offset": 23,
             },
-            "source": "<div id=abc /",
+            "source": "<div id=\\"abc\\"",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -3440,11 +2047,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 22,
+                  "column": 24,
                   "line": 1,
-                  "offset": 21,
+                  "offset": 23,
                 },
-                "source": "id=abc",
+                "source": "id=\\"abc\\"",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -3457,11 +2064,11 @@ Object {
                 "content": "abc",
                 "loc": Object {
                   "end": Object {
-                    "column": 22,
+                    "column": 24,
                     "line": 1,
-                    "offset": 21,
+                    "offset": 23,
                   },
-                  "source": "abc",
+                  "source": "\\"abc\\"",
                   "start": Object {
                     "column": 19,
                     "line": 1,
@@ -3485,7 +2092,7 @@ Object {
           "line": 1,
           "offset": 23,
         },
-        "source": "<template><div id=abc /",
+        "source": "<template><div id=\\"abc\\"",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3511,7 +2118,7 @@ Object {
       "line": 1,
       "offset": 23,
     },
-    "source": "<template><div id=abc /",
+    "source": "<template><div id=\\"abc\\"",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3523,7 +2130,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors EOF_IN_TAG <template><div id=abc 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id="abc"/ 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -3535,11 +2142,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 22,
+              "column": 25,
               "line": 1,
-              "offset": 21,
+              "offset": 24,
             },
-            "source": "<div id=abc",
+            "source": "<div id=\\"abc\\"/",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -3551,11 +2158,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 22,
+                  "column": 24,
                   "line": 1,
-                  "offset": 21,
+                  "offset": 23,
                 },
-                "source": "id=abc",
+                "source": "id=\\"abc\\"",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -3568,11 +2175,11 @@ Object {
                 "content": "abc",
                 "loc": Object {
                   "end": Object {
-                    "column": 22,
+                    "column": 24,
                     "line": 1,
-                    "offset": 21,
+                    "offset": 23,
                   },
-                  "source": "abc",
+                  "source": "\\"abc\\"",
                   "start": Object {
                     "column": 19,
                     "line": 1,
@@ -3592,81 +2199,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 22,
-          "line": 1,
-          "offset": 21,
-        },
-        "source": "<template><div id=abc",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 22,
-      "line": 1,
-      "offset": 21,
-    },
-    "source": "<template><div id=abc",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors INCORRECTLY_CLOSED_COMMENT <template><!--comment--!></template> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "children": Array [
-        Object {
-          "content": "comment",
-          "loc": Object {
-            "end": Object {
-              "column": 26,
-              "line": 1,
-              "offset": 25,
-            },
-            "source": "<!--comment--!>",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 3,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
-      "loc": Object {
-        "end": Object {
-          "column": 37,
+          "column": 25,
           "line": 1,
-          "offset": 36,
+          "offset": 24,
         },
-        "source": "<template><!--comment--!></template>",
+        "source": "<template><div id=\\"abc\\"/",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3688,57 +2225,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 37,
-      "line": 1,
-      "offset": 36,
-    },
-    "source": "<template><!--comment--!></template>",
-    "start": Object {
-      "column": 1,
-      "line": 1,
-      "offset": 0,
-    },
-  },
-  "temps": 0,
-  "type": 0,
-}
-`;
-
-exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <!DOCTYPE html> 1`] = `
-Object {
-  "cached": 0,
-  "children": Array [
-    Object {
-      "content": "DOCTYPE html",
-      "loc": Object {
-        "end": Object {
-          "column": 16,
-          "line": 1,
-          "offset": 15,
-        },
-        "source": "<!DOCTYPE html>",
-        "start": Object {
-          "column": 1,
-          "line": 1,
-          "offset": 0,
-        },
-      },
-      "type": 3,
-    },
-  ],
-  "codegenNode": undefined,
-  "components": Array [],
-  "directives": Array [],
-  "helpers": Array [],
-  "hoists": Array [],
-  "imports": Array [],
-  "loc": Object {
-    "end": Object {
-      "column": 16,
+      "column": 25,
       "line": 1,
-      "offset": 15,
+      "offset": 24,
     },
-    "source": "<!DOCTYPE html>",
+    "source": "<template><div id=\\"abc\\"/",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3750,39 +2241,80 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!></template> 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 14,
+              "column": 23,
               "line": 1,
-              "offset": 13,
+              "offset": 22,
             },
-            "source": "<!>",
+            "source": "<div id='abc",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 23,
+                  "line": 1,
+                  "offset": 22,
+                },
+                "source": "id='abc",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "abc",
+                "loc": Object {
+                  "end": Object {
+                    "column": 23,
+                    "line": 1,
+                    "offset": 22,
+                  },
+                  "source": "'abc",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 25,
+          "column": 23,
           "line": 1,
-          "offset": 24,
+          "offset": 22,
         },
-        "source": "<template><!></template>",
+        "source": "<template><div id='abc",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3804,11 +2336,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 25,
+      "column": 23,
       "line": 1,
-      "offset": 24,
+      "offset": 22,
     },
-    "source": "<template><!></template>",
+    "source": "<template><div id='abc",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3820,39 +2352,80 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!-></template> 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc' 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "-",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 24,
               "line": 1,
-              "offset": 14,
+              "offset": 23,
             },
-            "source": "<!->",
+            "source": "<div id='abc'",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 24,
+                  "line": 1,
+                  "offset": 23,
+                },
+                "source": "id='abc'",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "abc",
+                "loc": Object {
+                  "end": Object {
+                    "column": 24,
+                    "line": 1,
+                    "offset": 23,
+                  },
+                  "source": "'abc'",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 26,
+          "column": 24,
           "line": 1,
-          "offset": 25,
+          "offset": 23,
         },
-        "source": "<template><!-></template>",
+        "source": "<template><div id='abc'",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3874,11 +2447,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 26,
+      "column": 24,
       "line": 1,
-      "offset": 25,
+      "offset": 23,
     },
-    "source": "<template><!-></template>",
+    "source": "<template><div id='abc'",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3890,39 +2463,80 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!ELEMENT br EMPTY></template> 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id='abc'/ 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "ELEMENT br EMPTY",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 30,
+              "column": 25,
               "line": 1,
-              "offset": 29,
+              "offset": 24,
             },
-            "source": "<!ELEMENT br EMPTY>",
+            "source": "<div id='abc'/",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 24,
+                  "line": 1,
+                  "offset": 23,
+                },
+                "source": "id='abc'",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "abc",
+                "loc": Object {
+                  "end": Object {
+                    "column": 24,
+                    "line": 1,
+                    "offset": 23,
+                  },
+                  "source": "'abc'",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 41,
+          "column": 25,
           "line": 1,
-          "offset": 40,
+          "offset": 24,
         },
-        "source": "<template><!ELEMENT br EMPTY></template>",
+        "source": "<template><div id='abc'/",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -3944,11 +2558,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 41,
+      "column": 25,
       "line": 1,
-      "offset": 40,
+      "offset": 24,
     },
-    "source": "<template><!ELEMENT br EMPTY></template>",
+    "source": "<template><div id='abc'/",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -3960,39 +2574,80 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template></�></template> 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id=abc / 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "�",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 24,
               "line": 1,
-              "offset": 14,
+              "offset": 23,
             },
-            "source": "</�>",
+            "source": "<div id=abc /",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 22,
+                  "line": 1,
+                  "offset": 21,
+                },
+                "source": "id=abc",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "abc",
+                "loc": Object {
+                  "end": Object {
+                    "column": 22,
+                    "line": 1,
+                    "offset": 21,
+                  },
+                  "source": "abc",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 26,
+          "column": 24,
           "line": 1,
-          "offset": 25,
+          "offset": 23,
         },
-        "source": "<template></�></template>",
+        "source": "<template><div id=abc /",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4014,11 +2669,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 26,
+      "column": 24,
       "line": 1,
-      "offset": 25,
+      "offset": 23,
     },
-    "source": "<template></�></template>",
+    "source": "<template><div id=abc /",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4030,39 +2685,80 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template><�></template> 1`] = `
+exports[`compiler: parse Errors EOF_IN_TAG <template><div id=abc 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "<�>",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 14,
+              "column": 22,
               "line": 1,
-              "offset": 13,
+              "offset": 21,
             },
-            "source": "<�>",
+            "source": "<div id=abc",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 22,
+                  "line": 1,
+                  "offset": 21,
+                },
+                "source": "id=abc",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "abc",
+                "loc": Object {
+                  "end": Object {
+                    "column": 22,
+                    "line": 1,
+                    "offset": 21,
+                  },
+                  "source": "abc",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 25,
+          "column": 22,
           "line": 1,
-          "offset": 24,
+          "offset": 21,
         },
-        "source": "<template><�></template>",
+        "source": "<template><div id=abc",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4084,11 +2780,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 25,
+      "column": 22,
       "line": 1,
-      "offset": 24,
+      "offset": 21,
     },
-    "source": "<template><�></template>",
+    "source": "<template><div id=abc",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4100,57 +2796,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>{{a < b}}</template> 1`] = `
+exports[`compiler: parse Errors INCORRECTLY_CLOSED_COMMENT <template><!--comment--!></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": Object {
-            "content": "a < b",
-            "isConstant": false,
-            "isStatic": false,
-            "loc": Object {
-              "end": Object {
-                "column": 18,
-                "line": 1,
-                "offset": 17,
-              },
-              "source": "a < b",
-              "start": Object {
-                "column": 13,
-                "line": 1,
-                "offset": 12,
-              },
-            },
-            "type": 4,
-          },
+          "content": "comment",
           "loc": Object {
             "end": Object {
-              "column": 20,
+              "column": 26,
               "line": 1,
-              "offset": 19,
+              "offset": 25,
             },
-            "source": "{{a < b}}",
+            "source": "<!--comment--!>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 5,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 31,
+          "column": 37,
           "line": 1,
-          "offset": 30,
+          "offset": 36,
         },
-        "source": "<template>{{a < b}}</template>",
+        "source": "<template><!--comment--!></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4172,11 +2850,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 31,
+      "column": 37,
       "line": 1,
-      "offset": 30,
+      "offset": 36,
     },
-    "source": "<template>{{a < b}}</template>",
+    "source": "<template><!--comment--!></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4188,50 +2866,26 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>a < b</template> 1`] = `
+exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <!DOCTYPE html> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
-      "children": Array [
-        Object {
-          "content": "a < b",
-          "loc": Object {
-            "end": Object {
-              "column": 16,
-              "line": 1,
-              "offset": 15,
-            },
-            "source": "a < b",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 2,
-        },
-      ],
-      "codegenNode": undefined,
-      "isSelfClosing": false,
+      "content": "DOCTYPE html",
       "loc": Object {
         "end": Object {
-          "column": 27,
+          "column": 16,
           "line": 1,
-          "offset": 26,
+          "offset": 15,
         },
-        "source": "<template>a < b</template>",
+        "source": "<!DOCTYPE html>",
         "start": Object {
           "column": 1,
           "line": 1,
           "offset": 0,
         },
       },
-      "ns": 0,
-      "props": Array [],
-      "tag": "template",
-      "tagType": 0,
-      "type": 1,
+      "type": 3,
     },
   ],
   "codegenNode": undefined,
@@ -4242,11 +2896,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 27,
+      "column": 16,
       "line": 1,
-      "offset": 26,
+      "offset": 15,
     },
-    "source": "<template>a < b</template>",
+    "source": "<!DOCTYPE html>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4258,44 +2912,27 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>a </ b</template> 1`] = `
+exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "content": "",
           "loc": Object {
             "end": Object {
-              "column": 13,
+              "column": 14,
               "line": 1,
-              "offset": 12,
+              "offset": 13,
             },
-            "source": "",
+            "source": "<!>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
-        },
-        Object {
-          "content": " b</template",
-          "loc": Object {
-            "end": Object {
-              "column": 28,
-              "line": 1,
-              "offset": 27,
-            },
-            "source": "</ b</template>",
-            "start": Object {
-              "column": 13,
-              "line": 1,
-              "offset": 12,
-            },
-          },
           "type": 3,
         },
       ],
@@ -4303,11 +2940,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 28,
+          "column": 25,
           "line": 1,
-          "offset": 27,
+          "offset": 24,
         },
-        "source": "<template>a </ b</template>",
+        "source": "<template><!></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4329,11 +2966,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 28,
+      "column": 25,
       "line": 1,
-      "offset": 27,
+      "offset": 24,
     },
-    "source": "<template>a </ b</template>",
+    "source": "<template><!></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4345,80 +2982,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id= /></div></template> 1`] = `
+exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!-></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "-",
           "loc": Object {
             "end": Object {
-              "column": 28,
+              "column": 15,
               "line": 1,
-              "offset": 27,
+              "offset": 14,
             },
-            "source": "<div id= /></div>",
+            "source": "<!->",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 21,
-                  "line": 1,
-                  "offset": 20,
-                },
-                "source": "id= /",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "/",
-                "loc": Object {
-                  "end": Object {
-                    "column": 21,
-                    "line": 1,
-                    "offset": 20,
-                  },
-                  "source": "/",
-                  "start": Object {
-                    "column": 20,
-                    "line": 1,
-                    "offset": 19,
-                  },
-                },
-                "type": 2,
-              },
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 39,
+          "column": 26,
           "line": 1,
-          "offset": 38,
+          "offset": 25,
         },
-        "source": "<template><div id= /></div></template>",
+        "source": "<template><!-></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4440,11 +3036,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 39,
+      "column": 26,
       "line": 1,
-      "offset": 38,
+      "offset": 25,
     },
-    "source": "<template><div id= /></div></template>",
+    "source": "<template><!-></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4456,64 +3052,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id= ></div></template> 1`] = `
+exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT <template><!ELEMENT br EMPTY></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "ELEMENT br EMPTY",
           "loc": Object {
             "end": Object {
-              "column": 27,
+              "column": 30,
               "line": 1,
-              "offset": 26,
+              "offset": 29,
             },
-            "source": "<div id= ></div>",
+            "source": "<!ELEMENT br EMPTY>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 20,
-                  "line": 1,
-                  "offset": 19,
-                },
-                "source": "id= ",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": undefined,
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 38,
+          "column": 41,
           "line": 1,
-          "offset": 37,
+          "offset": 40,
         },
-        "source": "<template><div id= ></div></template>",
+        "source": "<template><!ELEMENT br EMPTY></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4535,11 +3106,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 38,
+      "column": 41,
       "line": 1,
-      "offset": 37,
+      "offset": 40,
     },
-    "source": "<template><div id= ></div></template>",
+    "source": "<template><!ELEMENT br EMPTY></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4551,64 +3122,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id=></div></template> 1`] = `
+exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template></�></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "children": Array [],
-          "codegenNode": undefined,
-          "isSelfClosing": false,
+          "content": "�",
           "loc": Object {
             "end": Object {
-              "column": 26,
+              "column": 15,
               "line": 1,
-              "offset": 25,
+              "offset": 14,
             },
-            "source": "<div id=></div>",
+            "source": "</�>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 19,
-                  "line": 1,
-                  "offset": 18,
-                },
-                "source": "id=",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": undefined,
-            },
-          ],
-          "tag": "div",
-          "tagType": 0,
-          "type": 1,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 37,
+          "column": 26,
           "line": 1,
-          "offset": 36,
+          "offset": 25,
         },
-        "source": "<template><div id=></div></template>",
+        "source": "<template></�></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4630,11 +3176,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 37,
+      "column": 26,
       "line": 1,
-      "offset": 36,
+      "offset": 25,
     },
-    "source": "<template><div id=></div></template>",
+    "source": "<template></�></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4646,12 +3192,30 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_END_TAG_NAME <template></></template> 1`] = `
+exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template><�></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
-      "children": Array [],
+      "children": Array [
+        Object {
+          "content": "<�>",
+          "loc": Object {
+            "end": Object {
+              "column": 14,
+              "line": 1,
+              "offset": 13,
+            },
+            "source": "<�>",
+            "start": Object {
+              "column": 11,
+              "line": 1,
+              "offset": 10,
+            },
+          },
+          "type": 2,
+        },
+      ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
@@ -4660,7 +3224,7 @@ Object {
           "line": 1,
           "offset": 24,
         },
-        "source": "<template></></template>",
+        "source": "<template><></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4686,7 +3250,7 @@ Object {
       "line": 1,
       "offset": 24,
     },
-    "source": "<template></></template>",
+    "source": "<template><></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4698,39 +3262,57 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE <template>&#40</template> 1`] = `
+exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>{{a < b}}</template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "(",
+          "content": Object {
+            "content": "a < b",
+            "isConstant": false,
+            "isStatic": false,
+            "loc": Object {
+              "end": Object {
+                "column": 18,
+                "line": 1,
+                "offset": 17,
+              },
+              "source": "a < b",
+              "start": Object {
+                "column": 13,
+                "line": 1,
+                "offset": 12,
+              },
+            },
+            "type": 4,
+          },
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 20,
               "line": 1,
-              "offset": 14,
+              "offset": 19,
             },
-            "source": "&#40",
+            "source": "{{a < b}}",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "type": 5,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 26,
+          "column": 31,
           "line": 1,
-          "offset": 25,
+          "offset": 30,
         },
-        "source": "<template>&#40</template>",
+        "source": "<template>{{a < b}}</template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4752,11 +3334,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 26,
+      "column": 31,
       "line": 1,
-      "offset": 25,
+      "offset": 30,
     },
-    "source": "<template>&#40</template>",
+    "source": "<template>{{a < b}}</template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4768,21 +3350,21 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE <template>&#x40</template> 1`] = `
+exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>a < b</template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "@",
+          "content": "a < b",
           "loc": Object {
             "end": Object {
               "column": 16,
               "line": 1,
               "offset": 15,
             },
-            "source": "&#x40",
+            "source": "a < b",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -4800,7 +3382,7 @@ Object {
           "line": 1,
           "offset": 26,
         },
-        "source": "<template>&#x40</template>",
+        "source": "<template>a < b</template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4826,7 +3408,7 @@ Object {
       "line": 1,
       "offset": 26,
     },
-    "source": "<template>&#x40</template>",
+    "source": "<template>a < b</template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4838,21 +3420,21 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE <template>&amp</template> 1`] = `
+exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <template>a </ b</template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "&",
+          "content": "",
           "loc": Object {
             "end": Object {
-              "column": 15,
+              "column": 13,
               "line": 1,
-              "offset": 14,
+              "offset": 12,
             },
-            "source": "&amp",
+            "source": "",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -4861,16 +3443,33 @@ Object {
           },
           "type": 2,
         },
+        Object {
+          "content": " b</template",
+          "loc": Object {
+            "end": Object {
+              "column": 28,
+              "line": 1,
+              "offset": 27,
+            },
+            "source": "</ b</template>",
+            "start": Object {
+              "column": 13,
+              "line": 1,
+              "offset": 12,
+            },
+          },
+          "type": 3,
+        },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 26,
+          "column": 28,
           "line": 1,
-          "offset": 25,
+          "offset": 27,
         },
-        "source": "<template>&amp</template>",
+        "source": "<template>a </ b</template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -4892,11 +3491,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 26,
+      "column": 28,
       "line": 1,
-      "offset": 25,
+      "offset": 27,
     },
-    "source": "<template>&amp</template>",
+    "source": "<template>a </ b</template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -4908,7 +3507,7 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES <template><div id="foo"\\x0d;\\x0a;class="bar"></div></template> 1`] = `
+exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id= /></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -4920,83 +3519,48 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 19,
-              "line": 2,
-              "offset": 43,
-            },
-            "source": "<div id=\\"foo\\"
-class=\\"bar\\"></div>",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "ns": 0,
-          "props": Array [
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 24,
-                  "line": 1,
-                  "offset": 23,
-                },
-                "source": "id=\\"foo\\"",
-                "start": Object {
-                  "column": 16,
-                  "line": 1,
-                  "offset": 15,
-                },
-              },
-              "name": "id",
-              "type": 6,
-              "value": Object {
-                "content": "foo",
-                "loc": Object {
-                  "end": Object {
-                    "column": 24,
-                    "line": 1,
-                    "offset": 23,
-                  },
-                  "source": "\\"foo\\"",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
+              "column": 28,
+              "line": 1,
+              "offset": 27,
+            },
+            "source": "<div id= /></div>",
+            "start": Object {
+              "column": 11,
+              "line": 1,
+              "offset": 10,
             },
+          },
+          "ns": 0,
+          "props": Array [
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 12,
-                  "line": 2,
-                  "offset": 36,
+                  "column": 21,
+                  "line": 1,
+                  "offset": 20,
                 },
-                "source": "class=\\"bar\\"",
+                "source": "id= /",
                 "start": Object {
-                  "column": 1,
-                  "line": 2,
-                  "offset": 25,
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
                 },
               },
-              "name": "class",
+              "name": "id",
               "type": 6,
               "value": Object {
-                "content": "bar",
+                "content": "/",
                 "loc": Object {
                   "end": Object {
-                    "column": 12,
-                    "line": 2,
-                    "offset": 36,
+                    "column": 21,
+                    "line": 1,
+                    "offset": 20,
                   },
-                  "source": "\\"bar\\"",
+                  "source": "/",
                   "start": Object {
-                    "column": 7,
-                    "line": 2,
-                    "offset": 31,
+                    "column": 20,
+                    "line": 1,
+                    "offset": 19,
                   },
                 },
                 "type": 2,
@@ -5012,12 +3576,11 @@ class=\\"bar\\"></div>",
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 30,
-          "line": 2,
-          "offset": 54,
+          "column": 39,
+          "line": 1,
+          "offset": 38,
         },
-        "source": "<template><div id=\\"foo\\"
-class=\\"bar\\"></div></template>",
+        "source": "<template><div id= /></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5039,12 +3602,11 @@ class=\\"bar\\"></div></template>",
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 30,
-      "line": 2,
-      "offset": 54,
+      "column": 39,
+      "line": 1,
+      "offset": 38,
     },
-    "source": "<template><div id=\\"foo\\"
-class=\\"bar\\"></div></template>",
+    "source": "<template><div id= /></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5056,7 +3618,7 @@ class=\\"bar\\"></div></template>",
 }
 `;
 
-exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES <template><div id="foo"class="bar"></div></template> 1`] = `
+exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id= ></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
@@ -5068,11 +3630,11 @@ Object {
           "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 42,
+              "column": 27,
               "line": 1,
-              "offset": 41,
+              "offset": 26,
             },
-            "source": "<div id=\\"foo\\"class=\\"bar\\"></div>",
+            "source": "<div id= ></div>",
             "start": Object {
               "column": 11,
               "line": 1,
@@ -5084,11 +3646,11 @@ Object {
             Object {
               "loc": Object {
                 "end": Object {
-                  "column": 24,
+                  "column": 20,
                   "line": 1,
-                  "offset": 23,
+                  "offset": 19,
                 },
-                "source": "id=\\"foo\\"",
+                "source": "id= ",
                 "start": Object {
                   "column": 16,
                   "line": 1,
@@ -5097,57 +3659,7 @@ Object {
               },
               "name": "id",
               "type": 6,
-              "value": Object {
-                "content": "foo",
-                "loc": Object {
-                  "end": Object {
-                    "column": 24,
-                    "line": 1,
-                    "offset": 23,
-                  },
-                  "source": "\\"foo\\"",
-                  "start": Object {
-                    "column": 19,
-                    "line": 1,
-                    "offset": 18,
-                  },
-                },
-                "type": 2,
-              },
-            },
-            Object {
-              "loc": Object {
-                "end": Object {
-                  "column": 35,
-                  "line": 1,
-                  "offset": 34,
-                },
-                "source": "class=\\"bar\\"",
-                "start": Object {
-                  "column": 24,
-                  "line": 1,
-                  "offset": 23,
-                },
-              },
-              "name": "class",
-              "type": 6,
-              "value": Object {
-                "content": "bar",
-                "loc": Object {
-                  "end": Object {
-                    "column": 35,
-                    "line": 1,
-                    "offset": 34,
-                  },
-                  "source": "\\"bar\\"",
-                  "start": Object {
-                    "column": 30,
-                    "line": 1,
-                    "offset": 29,
-                  },
-                },
-                "type": 2,
-              },
+              "value": undefined,
             },
           ],
           "tag": "div",
@@ -5159,11 +3671,11 @@ Object {
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 53,
+          "column": 38,
           "line": 1,
-          "offset": 52,
+          "offset": 37,
         },
-        "source": "<template><div id=\\"foo\\"class=\\"bar\\"></div></template>",
+        "source": "<template><div id= ></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5185,11 +3697,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 53,
+      "column": 38,
       "line": 1,
-      "offset": 52,
+      "offset": 37,
     },
-    "source": "<template><div id=\\"foo\\"class=\\"bar\\"></div></template>",
+    "source": "<template><div id= ></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5201,39 +3713,64 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!-- 1`] = `
+exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE <template><div id=></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "a<!--",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 20,
+              "column": 26,
               "line": 1,
-              "offset": 19,
+              "offset": 25,
             },
-            "source": "<!--a<!--",
+            "source": "<div id=></div>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 19,
+                  "line": 1,
+                  "offset": 18,
+                },
+                "source": "id=",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": undefined,
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 20,
+          "column": 37,
           "line": 1,
-          "offset": 19,
+          "offset": 36,
         },
-        "source": "<template><!--a<!--",
+        "source": "<template><div id=></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5255,11 +3792,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 20,
+      "column": 37,
       "line": 1,
-      "offset": 19,
+      "offset": 36,
     },
-    "source": "<template><!--a<!--",
+    "source": "<template><div id=></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5271,39 +3808,21 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--></template> 1`] = `
+exports[`compiler: parse Errors MISSING_END_TAG_NAME <template></></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
-      "children": Array [
-        Object {
-          "content": "a<!",
-          "loc": Object {
-            "end": Object {
-              "column": 21,
-              "line": 1,
-              "offset": 20,
-            },
-            "source": "<!--a<!-->",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
-            },
-          },
-          "type": 3,
-        },
-      ],
+      "children": Array [],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 32,
+          "column": 25,
           "line": 1,
-          "offset": 31,
+          "offset": 24,
         },
-        "source": "<template><!--a<!--></template>",
+        "source": "<template></></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5325,11 +3844,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 32,
+      "column": 25,
       "line": 1,
-      "offset": 31,
+      "offset": 24,
     },
-    "source": "<template><!--a<!--></template>",
+    "source": "<template></></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5341,39 +3860,116 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--b<!--c--></template> 1`] = `
+exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES <template><div id="foo"\\x0d;\\x0a;class="bar"></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "a<!--b<!--c",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 29,
+              "column": 19,
+              "line": 2,
+              "offset": 43,
+            },
+            "source": "<div id=\\"foo\\"
+class=\\"bar\\"></div>",
+            "start": Object {
+              "column": 11,
               "line": 1,
-              "offset": 28,
+              "offset": 10,
+            },
+          },
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 24,
+                  "line": 1,
+                  "offset": 23,
+                },
+                "source": "id=\\"foo\\"",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "foo",
+                "loc": Object {
+                  "end": Object {
+                    "column": 24,
+                    "line": 1,
+                    "offset": 23,
+                  },
+                  "source": "\\"foo\\"",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
             },
-            "source": "<!--a<!--b<!--c-->",
-            "start": Object {
-              "column": 11,
-              "line": 1,
-              "offset": 10,
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 12,
+                  "line": 2,
+                  "offset": 36,
+                },
+                "source": "class=\\"bar\\"",
+                "start": Object {
+                  "column": 1,
+                  "line": 2,
+                  "offset": 25,
+                },
+              },
+              "name": "class",
+              "type": 6,
+              "value": Object {
+                "content": "bar",
+                "loc": Object {
+                  "end": Object {
+                    "column": 12,
+                    "line": 2,
+                    "offset": 36,
+                  },
+                  "source": "\\"bar\\"",
+                  "start": Object {
+                    "column": 7,
+                    "line": 2,
+                    "offset": 31,
+                  },
+                },
+                "type": 2,
+              },
             },
-          },
-          "type": 3,
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 40,
-          "line": 1,
-          "offset": 39,
+          "column": 30,
+          "line": 2,
+          "offset": 54,
         },
-        "source": "<template><!--a<!--b<!--c--></template>",
+        "source": "<template><div id=\\"foo\\"
+class=\\"bar\\"></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5395,11 +3991,12 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 40,
-      "line": 1,
-      "offset": 39,
+      "column": 30,
+      "line": 2,
+      "offset": 54,
     },
-    "source": "<template><!--a<!--b<!--c--></template>",
+    "source": "<template><div id=\\"foo\\"
+class=\\"bar\\"></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5411,39 +4008,114 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--b--></template> 1`] = `
+exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES <template><div id="foo"class="bar"></div></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "a<!--b",
+          "children": Array [],
+          "codegenNode": undefined,
+          "isSelfClosing": false,
           "loc": Object {
             "end": Object {
-              "column": 24,
+              "column": 42,
               "line": 1,
-              "offset": 23,
+              "offset": 41,
             },
-            "source": "<!--a<!--b-->",
+            "source": "<div id=\\"foo\\"class=\\"bar\\"></div>",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 3,
+          "ns": 0,
+          "props": Array [
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 24,
+                  "line": 1,
+                  "offset": 23,
+                },
+                "source": "id=\\"foo\\"",
+                "start": Object {
+                  "column": 16,
+                  "line": 1,
+                  "offset": 15,
+                },
+              },
+              "name": "id",
+              "type": 6,
+              "value": Object {
+                "content": "foo",
+                "loc": Object {
+                  "end": Object {
+                    "column": 24,
+                    "line": 1,
+                    "offset": 23,
+                  },
+                  "source": "\\"foo\\"",
+                  "start": Object {
+                    "column": 19,
+                    "line": 1,
+                    "offset": 18,
+                  },
+                },
+                "type": 2,
+              },
+            },
+            Object {
+              "loc": Object {
+                "end": Object {
+                  "column": 35,
+                  "line": 1,
+                  "offset": 34,
+                },
+                "source": "class=\\"bar\\"",
+                "start": Object {
+                  "column": 24,
+                  "line": 1,
+                  "offset": 23,
+                },
+              },
+              "name": "class",
+              "type": 6,
+              "value": Object {
+                "content": "bar",
+                "loc": Object {
+                  "end": Object {
+                    "column": 35,
+                    "line": 1,
+                    "offset": 34,
+                  },
+                  "source": "\\"bar\\"",
+                  "start": Object {
+                    "column": 30,
+                    "line": 1,
+                    "offset": 29,
+                  },
+                },
+                "type": 2,
+              },
+            },
+          ],
+          "tag": "div",
+          "tagType": 0,
+          "type": 1,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 35,
+          "column": 53,
           "line": 1,
-          "offset": 34,
+          "offset": 52,
         },
-        "source": "<template><!--a<!--b--></template>",
+        "source": "<template><div id=\\"foo\\"class=\\"bar\\"></div></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5465,11 +4137,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 35,
+      "column": 53,
       "line": 1,
-      "offset": 34,
+      "offset": 52,
     },
-    "source": "<template><!--a<!--b--></template>",
+    "source": "<template><div id=\\"foo\\"class=\\"bar\\"></div></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5481,39 +4153,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NONCHARACTER_CHARACTER_REFERENCE <template>&#x1FFFF;</template> 1`] = `
+exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!-- 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "🿿",
+          "content": "a<!--",
           "loc": Object {
             "end": Object {
               "column": 20,
               "line": 1,
               "offset": 19,
             },
-            "source": "&#x1FFFF;",
+            "source": "<!--a<!--",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 31,
+          "column": 20,
           "line": 1,
-          "offset": 30,
+          "offset": 19,
         },
-        "source": "<template>&#x1FFFF;</template>",
+        "source": "<template><!--a<!--",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5535,11 +4207,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 31,
+      "column": 20,
       "line": 1,
-      "offset": 30,
+      "offset": 19,
     },
-    "source": "<template>&#x1FFFF;</template>",
+    "source": "<template><!--a<!--",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5551,39 +4223,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NONCHARACTER_CHARACTER_REFERENCE <template>&#xFFFE;</template> 1`] = `
+exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "content": "a<!",
           "loc": Object {
             "end": Object {
-              "column": 19,
+              "column": 21,
               "line": 1,
-              "offset": 18,
+              "offset": 20,
             },
-            "source": "&#xFFFE;",
+            "source": "<!--a<!-->",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 30,
+          "column": 32,
           "line": 1,
-          "offset": 29,
+          "offset": 31,
         },
-        "source": "<template>&#xFFFE;</template>",
+        "source": "<template><!--a<!--></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5605,11 +4277,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 30,
+      "column": 32,
       "line": 1,
-      "offset": 29,
+      "offset": 31,
     },
-    "source": "<template>&#xFFFE;</template>",
+    "source": "<template><!--a<!--></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5621,39 +4293,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors NULL_CHARACTER_REFERENCE <template>&#0000;</template> 1`] = `
+exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--b<!--c--></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "content": "a<!--b<!--c",
           "loc": Object {
             "end": Object {
-              "column": 18,
+              "column": 29,
               "line": 1,
-              "offset": 17,
+              "offset": 28,
             },
-            "source": "&#0000;",
+            "source": "<!--a<!--b<!--c-->",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 29,
+          "column": 40,
           "line": 1,
-          "offset": 28,
+          "offset": 39,
         },
-        "source": "<template>&#0000;</template>",
+        "source": "<template><!--a<!--b<!--c--></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5675,11 +4347,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 29,
+      "column": 40,
       "line": 1,
-      "offset": 28,
+      "offset": 39,
     },
-    "source": "<template>&#0000;</template>",
+    "source": "<template><!--a<!--b<!--c--></template>",
     "start": Object {
       "column": 1,
       "line": 1,
@@ -5691,39 +4363,39 @@ Object {
 }
 `;
 
-exports[`compiler: parse Errors SURROGATE_CHARACTER_REFERENCE <template>&#xD800;</template> 1`] = `
+exports[`compiler: parse Errors NESTED_COMMENT <template><!--a<!--b--></template> 1`] = `
 Object {
   "cached": 0,
   "children": Array [
     Object {
       "children": Array [
         Object {
-          "content": "",
+          "content": "a<!--b",
           "loc": Object {
             "end": Object {
-              "column": 19,
+              "column": 24,
               "line": 1,
-              "offset": 18,
+              "offset": 23,
             },
-            "source": "&#xD800;",
+            "source": "<!--a<!--b-->",
             "start": Object {
               "column": 11,
               "line": 1,
               "offset": 10,
             },
           },
-          "type": 2,
+          "type": 3,
         },
       ],
       "codegenNode": undefined,
       "isSelfClosing": false,
       "loc": Object {
         "end": Object {
-          "column": 30,
+          "column": 35,
           "line": 1,
-          "offset": 29,
+          "offset": 34,
         },
-        "source": "<template>&#xD800;</template>",
+        "source": "<template><!--a<!--b--></template>",
         "start": Object {
           "column": 1,
           "line": 1,
@@ -5745,11 +4417,11 @@ Object {
   "imports": Array [],
   "loc": Object {
     "end": Object {
-      "column": 30,
+      "column": 35,
       "line": 1,
-      "offset": 29,
+      "offset": 34,
     },
-    "source": "<template>&#xD800;</template>",
+    "source": "<template><!--a<!--b--></template>",
     "start": Object {
       "column": 1,
       "line": 1,
index 4b0992a5f195e2386fa8a31076fe00a50a4f9f58..d556a107036d3a853a8e3a13ea3f17bd9e1d3245 100644 (file)
@@ -9,7 +9,6 @@ import {
   NodeTypes,
   Position,
   TextNode,
-  AttributeNode,
   InterpolationNode
 } from '../src/ast'
 
@@ -163,114 +162,6 @@ describe('compiler: parse', () => {
         }
       })
     })
-
-    test('HTML entities compatibility in text (https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state).', () => {
-      const spy = jest.fn()
-      const ast = baseParse('&ampersand;', {
-        namedCharacterReferences: { amp: '&' },
-        onError: spy
-      })
-      const text = ast.children[0] as TextNode
-
-      expect(text).toStrictEqual({
-        type: NodeTypes.TEXT,
-        content: '&ersand;',
-        loc: {
-          start: { offset: 0, line: 1, column: 1 },
-          end: { offset: 11, line: 1, column: 12 },
-          source: '&ampersand;'
-        }
-      })
-      expect(spy.mock.calls).toMatchObject([
-        [
-          {
-            code: ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
-            loc: {
-              start: { offset: 4, line: 1, column: 5 }
-            }
-          }
-        ]
-      ])
-    })
-
-    test('HTML entities compatibility in attribute (https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state).', () => {
-      const spy = jest.fn()
-      const ast = baseParse(
-        '<div a="&ampersand;" b="&amp;ersand;" c="&amp!"></div>',
-        {
-          namedCharacterReferences: { amp: '&', 'amp;': '&' },
-          onError: spy
-        }
-      )
-      const element = ast.children[0] as ElementNode
-      const text1 = (element.props[0] as AttributeNode).value
-      const text2 = (element.props[1] as AttributeNode).value
-      const text3 = (element.props[2] as AttributeNode).value
-
-      expect(text1).toStrictEqual({
-        type: NodeTypes.TEXT,
-        content: '&ampersand;',
-        loc: {
-          start: { offset: 7, line: 1, column: 8 },
-          end: { offset: 20, line: 1, column: 21 },
-          source: '"&ampersand;"'
-        }
-      })
-      expect(text2).toStrictEqual({
-        type: NodeTypes.TEXT,
-        content: '&ersand;',
-        loc: {
-          start: { offset: 23, line: 1, column: 24 },
-          end: { offset: 37, line: 1, column: 38 },
-          source: '"&amp;ersand;"'
-        }
-      })
-      expect(text3).toStrictEqual({
-        type: NodeTypes.TEXT,
-        content: '&!',
-        loc: {
-          start: { offset: 40, line: 1, column: 41 },
-          end: { offset: 47, line: 1, column: 48 },
-          source: '"&amp!"'
-        }
-      })
-      expect(spy.mock.calls).toMatchObject([
-        [
-          {
-            code: ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
-            loc: {
-              start: { offset: 45, line: 1, column: 46 }
-            }
-          }
-        ]
-      ])
-    })
-
-    test('Some control character reference should be replaced.', () => {
-      const spy = jest.fn()
-      const ast = baseParse('&#x86;', { onError: spy })
-      const text = ast.children[0] as TextNode
-
-      expect(text).toStrictEqual({
-        type: NodeTypes.TEXT,
-        content: '†',
-        loc: {
-          start: { offset: 0, line: 1, column: 1 },
-          end: { offset: 6, line: 1, column: 7 },
-          source: '&#x86;'
-        }
-      })
-      expect(spy.mock.calls).toMatchObject([
-        [
-          {
-            code: ErrorCodes.CONTROL_CHARACTER_REFERENCE,
-            loc: {
-              start: { offset: 0, line: 1, column: 1 }
-            }
-          }
-        ]
-      ])
-    })
   })
 
   describe('Interpolation', () => {
@@ -1652,12 +1543,10 @@ foo
     expect(baz.loc.end).toEqual({ line: 2, column: 28, offset })
   })
 
-  describe('namedCharacterReferences option', () => {
+  describe('decodeEntities option', () => {
     test('use the given map', () => {
       const ast: any = baseParse('&amp;&cups;', {
-        namedCharacterReferences: {
-          'cups;': '\u222A\uFE00' // UNION with serifs
-        },
+        decodeEntities: text => text.replace('&cups;', '\u222A\uFE00'),
         onError: () => {} // Ignore errors
       })
 
@@ -1756,60 +1645,6 @@ foo
           errors: []
         }
       ],
-      ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&#a;</template>',
-          errors: [
-            {
-              type: ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#xg;</template>',
-          errors: [
-            {
-              type: ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#99;</template>',
-          errors: []
-        },
-        {
-          code: '<template>&#xff;</template>',
-          errors: []
-        },
-        {
-          code: '<template attr="&#a;"></template>',
-          errors: [
-            {
-              type: ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE,
-              loc: { offset: 16, line: 1, column: 17 }
-            }
-          ]
-        },
-        {
-          code: '<template attr="&#xg;"></template>',
-          errors: [
-            {
-              type: ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE,
-              loc: { offset: 16, line: 1, column: 17 }
-            }
-          ]
-        },
-        {
-          code: '<template attr="&#99;"></template>',
-          errors: []
-        },
-        {
-          code: '<template attr="&#xff;"></template>',
-          errors: []
-        }
-      ],
       CDATA_IN_HTML_CONTENT: [
         {
           code: '<template><![CDATA[cdata]]></template>',
@@ -1825,37 +1660,6 @@ foo
           errors: []
         }
       ],
-      CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE: [
-        {
-          code: '<template>&#1234567;</template>',
-          errors: [
-            {
-              type: ErrorCodes.CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        }
-      ],
-      CONTROL_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&#0003;</template>',
-          errors: [
-            {
-              type: ErrorCodes.CONTROL_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#x7F;</template>',
-          errors: [
-            {
-              type: ErrorCodes.CONTROL_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        }
-      ],
       DUPLICATE_ATTRIBUTE: [
         {
           code: '<template><div id="" id=""></div></template>',
@@ -2412,36 +2216,6 @@ foo
           ]
         }
       ],
-      MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&amp</template>',
-          options: { namedCharacterReferences: { amp: '&' } },
-          errors: [
-            {
-              type: ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
-              loc: { offset: 14, line: 1, column: 15 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#40</template>',
-          errors: [
-            {
-              type: ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
-              loc: { offset: 14, line: 1, column: 15 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#x40</template>',
-          errors: [
-            {
-              type: ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
-              loc: { offset: 15, line: 1, column: 16 }
-            }
-          ]
-        }
-      ],
       MISSING_WHITESPACE_BETWEEN_ATTRIBUTES: [
         {
           code: '<template><div id="foo"class="bar"></div></template>',
@@ -2500,48 +2274,6 @@ foo
           ]
         }
       ],
-      NONCHARACTER_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&#xFFFE;</template>',
-          errors: [
-            {
-              type: ErrorCodes.NONCHARACTER_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        },
-        {
-          code: '<template>&#x1FFFF;</template>',
-          errors: [
-            {
-              type: ErrorCodes.NONCHARACTER_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        }
-      ],
-      NULL_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&#0000;</template>',
-          errors: [
-            {
-              type: ErrorCodes.NULL_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        }
-      ],
-      SURROGATE_CHARACTER_REFERENCE: [
-        {
-          code: '<template>&#xD800;</template>',
-          errors: [
-            {
-              type: ErrorCodes.SURROGATE_CHARACTER_REFERENCE,
-              loc: { offset: 10, line: 1, column: 11 }
-            }
-          ]
-        }
-      ],
       UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME: [
         {
           code: "<template><div a\"bc=''></div></template>",
index 5d66ddcf18033b01e5ef2f52a80729100799114a..63c0bb0951618d71e4043176c145c7e67f8116c0 100644 (file)
@@ -32,10 +32,7 @@ export function createCompilerError<T extends number>(
 export const enum ErrorCodes {
   // parse errors
   ABRUPT_CLOSING_OF_EMPTY_COMMENT,
-  ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE,
   CDATA_IN_HTML_CONTENT,
-  CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE,
-  CONTROL_CHARACTER_REFERENCE,
   DUPLICATE_ATTRIBUTE,
   END_TAG_WITH_ATTRIBUTES,
   END_TAG_WITH_TRAILING_SOLIDUS,
@@ -49,12 +46,8 @@ export const enum ErrorCodes {
   INVALID_FIRST_CHARACTER_OF_TAG_NAME,
   MISSING_ATTRIBUTE_VALUE,
   MISSING_END_TAG_NAME,
-  MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE,
   MISSING_WHITESPACE_BETWEEN_ATTRIBUTES,
   NESTED_COMMENT,
-  NONCHARACTER_CHARACTER_REFERENCE,
-  NULL_CHARACTER_REFERENCE,
-  SURROGATE_CHARACTER_REFERENCE,
   UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME,
   UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE,
   UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME,
@@ -101,14 +94,8 @@ export const enum ErrorCodes {
 export const errorMessages: { [code: number]: string } = {
   // parse errors
   [ErrorCodes.ABRUPT_CLOSING_OF_EMPTY_COMMENT]: 'Illegal comment.',
-  [ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE]:
-    'Illegal numeric character reference: invalid character.',
   [ErrorCodes.CDATA_IN_HTML_CONTENT]:
     'CDATA section is allowed only in XML context.',
-  [ErrorCodes.CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE]:
-    'Illegal numeric character reference: too big.',
-  [ErrorCodes.CONTROL_CHARACTER_REFERENCE]:
-    'Illegal numeric character reference: control character.',
   [ErrorCodes.DUPLICATE_ATTRIBUTE]: 'Duplicate attribute.',
   [ErrorCodes.END_TAG_WITH_ATTRIBUTES]: 'End tag cannot have attributes.',
   [ErrorCodes.END_TAG_WITH_TRAILING_SOLIDUS]: "Illegal '/' in tags.",
@@ -124,17 +111,9 @@ export const errorMessages: { [code: number]: string } = {
     "Illegal tag name. Use '&lt;' to print '<'.",
   [ErrorCodes.MISSING_ATTRIBUTE_VALUE]: 'Attribute value was expected.',
   [ErrorCodes.MISSING_END_TAG_NAME]: 'End tag name was expected.',
-  [ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE]:
-    'Semicolon was expected.',
   [ErrorCodes.MISSING_WHITESPACE_BETWEEN_ATTRIBUTES]:
     'Whitespace was expected.',
   [ErrorCodes.NESTED_COMMENT]: "Unexpected '<!--' in comment.",
-  [ErrorCodes.NONCHARACTER_CHARACTER_REFERENCE]:
-    'Illegal numeric character reference: non character.',
-  [ErrorCodes.NULL_CHARACTER_REFERENCE]:
-    'Illegal numeric character reference: null character.',
-  [ErrorCodes.SURROGATE_CHARACTER_REFERENCE]:
-    'Illegal numeric character reference: non-pair surrogate.',
   [ErrorCodes.UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME]:
     'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).',
   [ErrorCodes.UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE]:
index 9bd8950bed4a1ad772ec97f664fe3de96e6f9670..056ea90fe89f641b508ff23267ad8935b3fe1669 100644 (file)
@@ -26,13 +26,7 @@ export interface ParserOptions {
     parent: ElementNode | undefined
   ) => TextModes
   delimiters?: [string, string] // ['{{', '}}']
-
-  // Map to HTML entities. E.g., `{ "amp;": "&" }`
-  // The full set is https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
-  namedCharacterReferences?: Record<string, string>
-  // this number is based on the map above, but it should be pre-computed
-  // to avoid the cost on every parse() call.
-  maxCRNameLength?: number
+  decodeEntities?: (rawText: string, asAttr: boolean) => string
   onError?: (error: CompilerError) => void
 }
 
index bb4e3e4a6a422ccf44f968988ec6fd1659a0c495..9d0dae204cc77774e9e9bc8f6e6c09e76b64784f 100644 (file)
@@ -30,6 +30,18 @@ type OptionalOptions = 'isNativeTag' | 'isBuiltInComponent'
 type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> &
   Pick<ParserOptions, OptionalOptions>
 
+// The default decoder only provides escapes for characters reserved as part of
+// the tempalte syntax, and is only used if the custom renderer did not provide
+// a platform-specific decoder.
+const decodeRE = /&(gt|lt|amp|apos|quot);/g
+const decodeMap: Record<string, string> = {
+  gt: '>',
+  lt: '<',
+  amp: '&',
+  apos: "'",
+  quot: '"'
+}
+
 export const defaultParserOptions: MergedParserOptions = {
   delimiters: [`{{`, `}}`],
   getNamespace: () => Namespaces.HTML,
@@ -37,14 +49,8 @@ export const defaultParserOptions: MergedParserOptions = {
   isVoidTag: NO,
   isPreTag: NO,
   isCustomElement: NO,
-  namedCharacterReferences: {
-    'gt;': '>',
-    'lt;': '<',
-    'amp;': '&',
-    'apos;': "'",
-    'quot;': '"'
-  },
-  maxCRNameLength: 5,
+  decodeEntities: (rawText: string): string =>
+    rawText.replace(decodeRE, (_, p1) => decodeMap[p1]),
   onError: defaultOnError
 }
 
@@ -57,7 +63,7 @@ export const enum TextModes {
   ATTRIBUTE_VALUE
 }
 
-interface ParserContext {
+export interface ParserContext {
   options: MergedParserOptions
   readonly originalSource: string
   source: string
@@ -812,128 +818,21 @@ function parseTextData(
   length: number,
   mode: TextModes
 ): string {
-  let rawText = context.source.slice(0, length)
+  const rawText = context.source.slice(0, length)
+  advanceBy(context, length)
   if (
     mode === TextModes.RAWTEXT ||
     mode === TextModes.CDATA ||
     rawText.indexOf('&') === -1
   ) {
-    advanceBy(context, length)
     return rawText
+  } else {
+    // DATA or RCDATA containing "&"". Entity decoding required.
+    return context.options.decodeEntities(
+      rawText,
+      mode === TextModes.ATTRIBUTE_VALUE
+    )
   }
-
-  // DATA or RCDATA containing "&"". Entity decoding required.
-  const end = context.offset + length
-  let decodedText = ''
-
-  function advance(length: number) {
-    advanceBy(context, length)
-    rawText = rawText.slice(length)
-  }
-
-  while (context.offset < end) {
-    const head = /&(?:#x?)?/i.exec(rawText)
-    if (!head || context.offset + head.index >= end) {
-      const remaining = end - context.offset
-      decodedText += rawText.slice(0, remaining)
-      advance(remaining)
-      break
-    }
-
-    // Advance to the "&".
-    decodedText += rawText.slice(0, head.index)
-    advance(head.index)
-
-    if (head[0] === '&') {
-      // Named character reference.
-      let name = ''
-      let value: string | undefined = undefined
-      if (/[0-9a-z]/i.test(rawText[1])) {
-        for (
-          let length = context.options.maxCRNameLength;
-          !value && length > 0;
-          --length
-        ) {
-          name = rawText.substr(1, length)
-          value = context.options.namedCharacterReferences[name]
-        }
-        if (value) {
-          const semi = name.endsWith(';')
-          if (
-            mode === TextModes.ATTRIBUTE_VALUE &&
-            !semi &&
-            /[=a-z0-9]/i.test(rawText[name.length + 1] || '')
-          ) {
-            decodedText += '&' + name
-            advance(1 + name.length)
-          } else {
-            decodedText += value
-            advance(1 + name.length)
-            if (!semi) {
-              emitError(
-                context,
-                ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE
-              )
-            }
-          }
-        } else {
-          decodedText += '&' + name
-          advance(1 + name.length)
-        }
-      } else {
-        decodedText += '&'
-        advance(1)
-      }
-    } else {
-      // Numeric character reference.
-      const hex = head[0] === '&#x'
-      const pattern = hex ? /^&#x([0-9a-f]+);?/i : /^&#([0-9]+);?/
-      const body = pattern.exec(rawText)
-      if (!body) {
-        decodedText += head[0]
-        emitError(
-          context,
-          ErrorCodes.ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE
-        )
-        advance(head[0].length)
-      } else {
-        // https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
-        let cp = Number.parseInt(body[1], hex ? 16 : 10)
-        if (cp === 0) {
-          emitError(context, ErrorCodes.NULL_CHARACTER_REFERENCE)
-          cp = 0xfffd
-        } else if (cp > 0x10ffff) {
-          emitError(
-            context,
-            ErrorCodes.CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE
-          )
-          cp = 0xfffd
-        } else if (cp >= 0xd800 && cp <= 0xdfff) {
-          emitError(context, ErrorCodes.SURROGATE_CHARACTER_REFERENCE)
-          cp = 0xfffd
-        } else if ((cp >= 0xfdd0 && cp <= 0xfdef) || (cp & 0xfffe) === 0xfffe) {
-          emitError(context, ErrorCodes.NONCHARACTER_CHARACTER_REFERENCE)
-        } else if (
-          (cp >= 0x01 && cp <= 0x08) ||
-          cp === 0x0b ||
-          (cp >= 0x0d && cp <= 0x1f) ||
-          (cp >= 0x7f && cp <= 0x9f)
-        ) {
-          emitError(context, ErrorCodes.CONTROL_CHARACTER_REFERENCE)
-          cp = CCR_REPLACEMENTS[cp] || cp
-        }
-        decodedText += String.fromCodePoint(cp)
-        advance(body[0].length)
-        if (!body![0].endsWith(';')) {
-          emitError(
-            context,
-            ErrorCodes.MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE
-          )
-        }
-      }
-    }
-  }
-  return decodedText
 }
 
 function getCursor(context: ParserContext): Position {
@@ -1052,34 +951,3 @@ function startsWithEndTagOpen(source: string, tag: string): boolean {
     /[\t\n\f />]/.test(source[2 + tag.length] || '>')
   )
 }
-
-// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
-const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
-  0x80: 0x20ac,
-  0x82: 0x201a,
-  0x83: 0x0192,
-  0x84: 0x201e,
-  0x85: 0x2026,
-  0x86: 0x2020,
-  0x87: 0x2021,
-  0x88: 0x02c6,
-  0x89: 0x2030,
-  0x8a: 0x0160,
-  0x8b: 0x2039,
-  0x8c: 0x0152,
-  0x8e: 0x017d,
-  0x91: 0x2018,
-  0x92: 0x2019,
-  0x93: 0x201c,
-  0x94: 0x201d,
-  0x95: 0x2022,
-  0x96: 0x2013,
-  0x97: 0x2014,
-  0x98: 0x02dc,
-  0x99: 0x2122,
-  0x9a: 0x0161,
-  0x9b: 0x203a,
-  0x9c: 0x0153,
-  0x9e: 0x017e,
-  0x9f: 0x0178
-}
index 73a27e205d5fa813b7ebdf76e9072a7287901ad6..9f227fa2184a0fda0687884ac78db1e9dd422998 100644 (file)
@@ -5,12 +5,10 @@ import {
   TextNode,
   ErrorCodes,
   ElementTypes,
-  InterpolationNode
+  InterpolationNode,
+  AttributeNode
 } from '@vue/compiler-core'
-import {
-  parserOptionsStandard as parserOptions,
-  DOMNamespaces
-} from '../src/parserOptionsStandard'
+import { parserOptions, DOMNamespaces } from '../src/parserOptions'
 
 describe('DOM parser', () => {
   describe('Text', () => {
@@ -170,6 +168,77 @@ describe('DOM parser', () => {
         content: `foo${nbsp}${nbsp}bar`
       })
     })
+
+    // https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
+    test('HTML entities compatibility in text', () => {
+      const ast = parse('&ampersand;', parserOptions)
+      const text = ast.children[0] as TextNode
+
+      expect(text).toStrictEqual({
+        type: NodeTypes.TEXT,
+        content: '&ersand;',
+        loc: {
+          start: { offset: 0, line: 1, column: 1 },
+          end: { offset: 11, line: 1, column: 12 },
+          source: '&ampersand;'
+        }
+      })
+    })
+
+    // https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
+    test('HTML entities compatibility in attribute', () => {
+      const ast = parse(
+        '<div a="&ampersand;" b="&amp;ersand;" c="&amp!"></div>',
+        parserOptions
+      )
+      const element = ast.children[0] as ElementNode
+      const text1 = (element.props[0] as AttributeNode).value
+      const text2 = (element.props[1] as AttributeNode).value
+      const text3 = (element.props[2] as AttributeNode).value
+
+      expect(text1).toStrictEqual({
+        type: NodeTypes.TEXT,
+        content: '&ampersand;',
+        loc: {
+          start: { offset: 7, line: 1, column: 8 },
+          end: { offset: 20, line: 1, column: 21 },
+          source: '"&ampersand;"'
+        }
+      })
+      expect(text2).toStrictEqual({
+        type: NodeTypes.TEXT,
+        content: '&ersand;',
+        loc: {
+          start: { offset: 23, line: 1, column: 24 },
+          end: { offset: 37, line: 1, column: 38 },
+          source: '"&amp;ersand;"'
+        }
+      })
+      expect(text3).toStrictEqual({
+        type: NodeTypes.TEXT,
+        content: '&!',
+        loc: {
+          start: { offset: 40, line: 1, column: 41 },
+          end: { offset: 47, line: 1, column: 48 },
+          source: '"&amp!"'
+        }
+      })
+    })
+
+    test('Some control character reference should be replaced.', () => {
+      const ast = parse('&#x86;', parserOptions)
+      const text = ast.children[0] as TextNode
+
+      expect(text).toStrictEqual({
+        type: NodeTypes.TEXT,
+        content: '†',
+        loc: {
+          start: { offset: 0, line: 1, column: 1 },
+          end: { offset: 6, line: 1, column: 7 },
+          source: '&#x86;'
+        }
+      })
+    })
   })
 
   describe('Interpolation', () => {
diff --git a/packages/compiler-dom/src/decodeHtml.ts b/packages/compiler-dom/src/decodeHtml.ts
new file mode 100644 (file)
index 0000000..3d9823c
--- /dev/null
@@ -0,0 +1,133 @@
+import { ParserOptions } from '@vue/compiler-core'
+import namedCharacterReferences from './namedChars.json'
+
+// lazy compute this to make this file tree-shakable for browser
+let maxCRNameLength: number
+
+export const decodeHtml: ParserOptions['decodeEntities'] = (
+  rawText,
+  asAttr
+) => {
+  let offset = 0
+  const end = rawText.length
+  let decodedText = ''
+
+  function advance(length: number) {
+    offset += length
+    rawText = rawText.slice(length)
+  }
+
+  while (offset < end) {
+    const head = /&(?:#x?)?/i.exec(rawText)
+    if (!head || offset + head.index >= end) {
+      const remaining = end - offset
+      decodedText += rawText.slice(0, remaining)
+      advance(remaining)
+      break
+    }
+
+    // Advance to the "&".
+    decodedText += rawText.slice(0, head.index)
+    advance(head.index)
+
+    if (head[0] === '&') {
+      // Named character reference.
+      let name = ''
+      let value: string | undefined = undefined
+      if (/[0-9a-z]/i.test(rawText[1])) {
+        if (!maxCRNameLength) {
+          maxCRNameLength = Object.keys(namedCharacterReferences).reduce(
+            (max, name) => Math.max(max, name.length),
+            0
+          )
+        }
+        for (let length = maxCRNameLength; !value && length > 0; --length) {
+          name = rawText.substr(1, length)
+          value = (namedCharacterReferences as Record<string, string>)[name]
+        }
+        if (value) {
+          const semi = name.endsWith(';')
+          if (
+            asAttr &&
+            !semi &&
+            /[=a-z0-9]/i.test(rawText[name.length + 1] || '')
+          ) {
+            decodedText += '&' + name
+            advance(1 + name.length)
+          } else {
+            decodedText += value
+            advance(1 + name.length)
+          }
+        } else {
+          decodedText += '&' + name
+          advance(1 + name.length)
+        }
+      } else {
+        decodedText += '&'
+        advance(1)
+      }
+    } else {
+      // Numeric character reference.
+      const hex = head[0] === '&#x'
+      const pattern = hex ? /^&#x([0-9a-f]+);?/i : /^&#([0-9]+);?/
+      const body = pattern.exec(rawText)
+      if (!body) {
+        decodedText += head[0]
+        advance(head[0].length)
+      } else {
+        // https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
+        let cp = Number.parseInt(body[1], hex ? 16 : 10)
+        if (cp === 0) {
+          cp = 0xfffd
+        } else if (cp > 0x10ffff) {
+          cp = 0xfffd
+        } else if (cp >= 0xd800 && cp <= 0xdfff) {
+          cp = 0xfffd
+        } else if ((cp >= 0xfdd0 && cp <= 0xfdef) || (cp & 0xfffe) === 0xfffe) {
+          // noop
+        } else if (
+          (cp >= 0x01 && cp <= 0x08) ||
+          cp === 0x0b ||
+          (cp >= 0x0d && cp <= 0x1f) ||
+          (cp >= 0x7f && cp <= 0x9f)
+        ) {
+          cp = CCR_REPLACEMENTS[cp] || cp
+        }
+        decodedText += String.fromCodePoint(cp)
+        advance(body[0].length)
+      }
+    }
+  }
+  return decodedText
+}
+
+// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
+const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
+  0x80: 0x20ac,
+  0x82: 0x201a,
+  0x83: 0x0192,
+  0x84: 0x201e,
+  0x85: 0x2026,
+  0x86: 0x2020,
+  0x87: 0x2021,
+  0x88: 0x02c6,
+  0x89: 0x2030,
+  0x8a: 0x0160,
+  0x8b: 0x2039,
+  0x8c: 0x0152,
+  0x8e: 0x017d,
+  0x91: 0x2018,
+  0x92: 0x2019,
+  0x93: 0x201c,
+  0x94: 0x201d,
+  0x95: 0x2022,
+  0x96: 0x2013,
+  0x97: 0x2014,
+  0x98: 0x02dc,
+  0x99: 0x2122,
+  0x9a: 0x0161,
+  0x9b: 0x203a,
+  0x9c: 0x0153,
+  0x9e: 0x017e,
+  0x9f: 0x0178
+}
diff --git a/packages/compiler-dom/src/decodeHtmlBrowser.ts b/packages/compiler-dom/src/decodeHtmlBrowser.ts
new file mode 100644 (file)
index 0000000..ccc5d12
--- /dev/null
@@ -0,0 +1,6 @@
+let decoder: HTMLDivElement
+
+export function decodeHtmlBrowser(raw: string): string {
+  ;(decoder || (decoder = document.createElement('div'))).innerHTML = raw
+  return decoder.textContent as string
+}
index b020226366170fdefa3283dc810e2cf9b5e33ca6..d250c8bd59ba15336d448a1025fd9082e1ed43b8 100644 (file)
@@ -9,8 +9,7 @@ import {
   NodeTransform,
   DirectiveTransform
 } from '@vue/compiler-core'
-import { parserOptionsMinimal } from './parserOptionsMinimal'
-import { parserOptionsStandard } from './parserOptionsStandard'
+import { parserOptions } from './parserOptions'
 import { transformStyle } from './transforms/transformStyle'
 import { transformVHtml } from './transforms/vHtml'
 import { transformVText } from './transforms/vText'
@@ -20,9 +19,7 @@ import { transformShow } from './transforms/vShow'
 import { warnTransitionChildren } from './transforms/warnTransitionChildren'
 import { stringifyStatic } from './transforms/stringifyStatic'
 
-export const parserOptions = __BROWSER__
-  ? parserOptionsMinimal
-  : parserOptionsStandard
+export { parserOptions }
 
 export const DOMNodeTransforms: NodeTransform[] = [
   transformStyle,
similarity index 92%
rename from packages/compiler-dom/src/parserOptionsMinimal.ts
rename to packages/compiler-dom/src/parserOptions.ts
index 75731097342ed8374af921379bd40c31e30cacba..5874260501a4982188485bf3d6c5031c18f4c32a 100644 (file)
@@ -8,6 +8,8 @@ import {
 } from '@vue/compiler-core'
 import { makeMap, isVoidTag, isHTMLTag, isSVGTag } from '@vue/shared'
 import { TRANSITION, TRANSITION_GROUP } from './runtimeHelpers'
+import { decodeHtml } from './decodeHtml'
+import { decodeHtmlBrowser } from './decodeHtmlBrowser'
 
 const isRawTextContainer = /*#__PURE__*/ makeMap(
   'style,iframe,script,noscript',
@@ -20,10 +22,11 @@ export const enum DOMNamespaces {
   MATH_ML
 }
 
-export const parserOptionsMinimal: ParserOptions = {
+export const parserOptions: ParserOptions = {
   isVoidTag,
   isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag),
   isPreTag: tag => tag === 'pre',
+  decodeEntities: __BROWSER__ ? decodeHtmlBrowser : decodeHtml,
 
   isBuiltInComponent: (tag: string): symbol | undefined => {
     if (isBuiltInType(tag, `Transition`)) {
diff --git a/packages/compiler-dom/src/parserOptionsStandard.ts b/packages/compiler-dom/src/parserOptionsStandard.ts
deleted file mode 100644 (file)
index b0bb70e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import { ParserOptions } from '@vue/compiler-core'
-import { parserOptionsMinimal } from './parserOptionsMinimal'
-import namedCharacterReferences from './namedChars.json'
-
-export { DOMNamespaces } from './parserOptionsMinimal'
-
-export const parserOptionsStandard: ParserOptions = {
-  // extends the minimal options with more spec-compliant overrides
-  ...parserOptionsMinimal,
-
-  // https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
-  namedCharacterReferences,
-  maxCRNameLength: /*#__PURE__*/ Object.keys(namedCharacterReferences).reduce(
-    (max, name) => Math.max(max, name.length),
-    0
-  )
-}