"cached": 0,
"children": [
{
- "children": [
- {
- "content": "",
- "loc": {
- "end": {
- "column": 17,
- "line": 1,
- "offset": 16,
- },
- "source": "<!--->",
- "start": {
- "column": 11,
- "line": 1,
- "offset": 10,
- },
- },
- "type": 3,
- },
- ],
+ "children": [],
"codegenNode": undefined,
- "isSelfClosing": false,
+ "isSelfClosing": true,
"loc": {
"end": {
- "column": 28,
+ "column": 37,
"line": 1,
- "offset": 27,
+ "offset": 36,
},
- "source": "<div :class=\\"{ some: condition }\\" />",
- "source": "<template><!---></template>",
++ "source": "<div :class="{ some: condition }" />",
"start": {
"column": 1,
"line": 1,
},
},
"ns": 0,
- "props": [],
- "tag": "template",
- "tagType": 0,
- "type": 1,
- },
- ],
- "codegenNode": undefined,
- "components": [],
- "directives": [],
- "helpers": Set {},
- "hoists": [],
- "imports": [],
- "loc": {
- "end": {
- "column": 28,
- "line": 1,
- "offset": 27,
- },
- "source": "<template><!---></template>",
- "start": {
- "column": 1,
- "line": 1,
- "offset": 0,
- },
- },
- "temps": 0,
- "type": 0,
-}
-`;
-
-exports[`compiler: parse > Errors > ABRUPT_CLOSING_OF_EMPTY_COMMENT > <template><!----></template> 1`] = `
-{
- "cached": 0,
- "children": [
- {
- "children": [
+ "props": [
{
- "content": "",
+ "arg": {
+ "constType": 3,
+ "content": "class",
+ "isStatic": true,
+ "loc": {
+ "end": {
+ "column": 12,
+ "line": 1,
+ "offset": 11,
+ },
+ "source": "class",
+ "start": {
+ "column": 7,
+ "line": 1,
+ "offset": 6,
+ },
+ },
+ "type": 4,
+ },
+ "exp": {
+ "constType": 0,
+ "content": "{ some: condition }",
+ "isStatic": false,
+ "loc": {
+ "end": {
+ "column": 33,
+ "line": 1,
+ "offset": 32,
+ },
+ "source": "{ some: condition }",
+ "start": {
+ "column": 14,
+ "line": 1,
+ "offset": 13,
+ },
+ },
+ "type": 4,
+ },
"loc": {
"end": {
- "column": 18,
+ "column": 34,
"line": 1,
- "offset": 17,
+ "offset": 33,
},
- "source": ":class=\\"{ some: condition }\\"",
- "source": "<!---->",
++ "source": ":class="{ some: condition }"",
"start": {
- "column": 11,
+ "column": 6,
"line": 1,
- "offset": 10,
+ "offset": 5,
},
},
- "type": 3,
+ "modifiers": [],
+ "name": "bind",
+ "rawName": ":class",
+ "type": 7,
},
],
+ "tag": "div",
+ "tagType": 0,
+ "type": 1,
+ },
+ {
+ "children": [],
"codegenNode": undefined,
- "isSelfClosing": false,
+ "isSelfClosing": true,
"loc": {
"end": {
- "column": 29,
- "line": 1,
- "offset": 28,
+ "column": 37,
+ "line": 2,
+ "offset": 73,
},
- "source": "<p v-bind:style=\\"{ color: 'red' }\\"/>",
- "source": "<template><!----></template>",
++ "source": "<p v-bind:style="{ color: 'red' }"/>",
"start": {
"column": 1,
- "line": 1,
- "offset": 0,
+ "line": 2,
+ "offset": 37,
},
},
"ns": 0,
- "props": [],
- "tag": "template",
+ "props": [
+ {
+ "arg": {
+ "constType": 3,
+ "content": "style",
+ "isStatic": true,
+ "loc": {
+ "end": {
+ "column": 16,
+ "line": 2,
+ "offset": 52,
+ },
+ "source": "style",
+ "start": {
+ "column": 11,
+ "line": 2,
+ "offset": 47,
+ },
+ },
+ "type": 4,
+ },
+ "exp": {
+ "constType": 0,
+ "content": "{ color: 'red' }",
+ "isStatic": false,
+ "loc": {
+ "end": {
+ "column": 34,
+ "line": 2,
+ "offset": 70,
+ },
+ "source": "{ color: 'red' }",
+ "start": {
+ "column": 18,
+ "line": 2,
+ "offset": 54,
+ },
+ },
+ "type": 4,
+ },
+ "loc": {
+ "end": {
+ "column": 35,
+ "line": 2,
+ "offset": 71,
+ },
- "source": "v-bind:style=\\"{ color: 'red' }\\"",
++ "source": "v-bind:style="{ color: 'red' }"",
+ "start": {
+ "column": 4,
+ "line": 2,
+ "offset": 40,
+ },
+ },
+ "modifiers": [],
+ "name": "bind",
+ "rawName": "v-bind:style",
+ "type": 7,
+ },
+ ],
+ "tag": "p",
"tagType": 0,
"type": 1,
},
"imports": [],
"loc": {
"end": {
- "column": 29,
- "line": 1,
- "offset": 28,
+ "column": 37,
+ "line": 2,
+ "offset": 73,
},
- "source": "<div :class=\\"{ some: condition }\\" />
- <p v-bind:style=\\"{ color: 'red' }\\"/>",
- "source": "<template><!----></template>",
++ "source": "<div :class="{ some: condition }" />
++<p v-bind:style="{ color: 'red' }"/>",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<div :class=\\"{ some: condition }\\" />
- <p v-bind:style=\\"{ color: 'red' }\\"/>",
++ "source": "<div :class="{ some: condition }" />
++<p v-bind:style="{ color: 'red' }"/>",
"temps": 0,
"type": 0,
}
{
"children": [
{
- "content": "[CDATA[cdata]]",
+ "children": [],
+ "codegenNode": undefined,
+ "isSelfClosing": true,
"loc": {
"end": {
- "column": 28,
- "line": 1,
- "offset": 27,
+ "column": 39,
+ "line": 2,
+ "offset": 73,
},
- "source": "<p v-bind:style=\\"{ color: 'red' }\\"/>",
- "source": "<![CDATA[cdata]]>",
++ "source": "<p v-bind:style="{ color: 'red' }"/>",
"start": {
- "column": 11,
- "line": 1,
- "offset": 10,
+ "column": 3,
+ "line": 2,
+ "offset": 37,
+ },
+ },
+ "ns": 0,
+ "props": [
+ {
+ "arg": {
+ "constType": 3,
+ "content": "style",
+ "isStatic": true,
+ "loc": {
+ "end": {
+ "column": 18,
+ "line": 2,
+ "offset": 52,
+ },
+ "source": "style",
+ "start": {
+ "column": 13,
+ "line": 2,
+ "offset": 47,
+ },
+ },
+ "type": 4,
+ },
+ "exp": {
+ "constType": 0,
+ "content": "{ color: 'red' }",
+ "isStatic": false,
+ "loc": {
+ "end": {
+ "column": 36,
+ "line": 2,
+ "offset": 70,
+ },
+ "source": "{ color: 'red' }",
+ "start": {
+ "column": 20,
+ "line": 2,
+ "offset": 54,
+ },
+ },
+ "type": 4,
+ },
+ "loc": {
+ "end": {
+ "column": 37,
+ "line": 2,
+ "offset": 71,
+ },
- "source": "v-bind:style=\\"{ color: 'red' }\\"",
++ "source": "v-bind:style="{ color: 'red' }"",
+ "start": {
+ "column": 6,
+ "line": 2,
+ "offset": 40,
+ },
+ },
+ "modifiers": [],
+ "name": "bind",
+ "rawName": "v-bind:style",
+ "type": 7,
+ },
+ ],
+ "tag": "p",
+ "tagType": 0,
+ "type": 1,
+ },
+ {
+ "content": " a comment with <html> inside it ",
+ "loc": {
+ "end": {
+ "column": 43,
+ "line": 3,
+ "offset": 116,
+ },
+ "source": "<!-- a comment with <html> inside it -->",
+ "start": {
+ "column": 3,
+ "line": 3,
+ "offset": 76,
},
},
"type": 3,
},
],
"codegenNode": undefined,
- "isSelfClosing": false,
+ "loc": {
+ "end": {
+ "column": 7,
+ "line": 4,
+ "offset": 123,
+ },
- "source": "<div :class=\\"{ some: condition }\\">
- <p v-bind:style=\\"{ color: 'red' }\\"/>
++ "source": "<div :class="{ some: condition }">
++ <p v-bind:style="{ color: 'red' }"/>
+ <!-- a comment with <html> inside it -->
+</div>",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
+ "ns": 0,
+ "props": [
+ {
+ "arg": {
+ "constType": 3,
+ "content": "class",
+ "isStatic": true,
+ "loc": {
+ "end": {
+ "column": 12,
+ "line": 1,
+ "offset": 11,
+ },
+ "source": "class",
+ "start": {
+ "column": 7,
+ "line": 1,
+ "offset": 6,
+ },
+ },
+ "type": 4,
+ },
+ "exp": {
+ "constType": 0,
+ "content": "{ some: condition }",
+ "isStatic": false,
+ "loc": {
+ "end": {
+ "column": 33,
+ "line": 1,
+ "offset": 32,
+ },
+ "source": "{ some: condition }",
+ "start": {
+ "column": 14,
+ "line": 1,
+ "offset": 13,
+ },
+ },
+ "type": 4,
+ },
+ "loc": {
+ "end": {
+ "column": 34,
+ "line": 1,
+ "offset": 33,
+ },
- "source": ":class=\\"{ some: condition }\\"",
++ "source": ":class="{ some: condition }"",
+ "start": {
+ "column": 6,
+ "line": 1,
+ "offset": 5,
+ },
+ },
+ "modifiers": [],
+ "name": "bind",
+ "rawName": ":class",
+ "type": 7,
+ },
+ ],
+ "tag": "div",
+ "tagType": 0,
+ "type": 1,
+ },
+ ],
+ "codegenNode": undefined,
+ "components": [],
+ "directives": [],
+ "helpers": Set {},
+ "hoists": [],
+ "imports": [],
+ "loc": {
+ "end": {
+ "column": 7,
+ "line": 4,
+ "offset": 123,
+ },
- "source": "<div :class=\\"{ some: condition }\\">
- <p v-bind:style=\\"{ color: 'red' }\\"/>
++ "source": "<div :class="{ some: condition }">
++ <p v-bind:style="{ color: 'red' }"/>
+ <!-- a comment with <html> inside it -->
+</div>",
+ "start": {
+ "column": 1,
+ "line": 1,
+ "offset": 0,
+ },
+ },
- "source": "<div :class=\\"{ some: condition }\\">
- <p v-bind:style=\\"{ color: 'red' }\\"/>
++ "source": "<div :class="{ some: condition }">
++ <p v-bind:style="{ color: 'red' }"/>
+ <!-- a comment with <html> inside it -->
+</div>",
+ "temps": 0,
+ "type": 0,
+}
+`;
+
+exports[`compiler: parse > Errors > CDATA_IN_HTML_CONTENT > <template><![CDATA[cdata]]></template> 1`] = `
+{
+ "cached": 0,
+ "children": [
+ {
+ "children": [],
+ "codegenNode": undefined,
"loc": {
"end": {
"column": 39,
"offset": 0,
},
},
- "source": "<template><div id=\\"\\" id=\\"\\"></div></template>",
++ "source": "<template><div id="" id=""></div></template>",
"temps": 0,
"type": 0,
}
"cached": 0,
"children": [
{
- "children": [
- {
- "children": [],
- "codegenNode": undefined,
- "isSelfClosing": false,
- "loc": {
- "end": {
- "column": 16,
- "line": 1,
- "offset": 15,
- },
- "source": "<div ",
- "start": {
- "column": 11,
- "line": 1,
- "offset": 10,
- },
- },
- "ns": 0,
- "props": [],
- "tag": "div",
- "tagType": 0,
- "type": 1,
- },
- ],
+ "children": [],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 16,
+ "column": 24,
"line": 1,
- "offset": 15,
+ "offset": 23,
},
- "source": "<template><div id=\\"abc",
- "source": "<template><div ",
++ "source": "<template><div id="abc",
"start": {
"column": 1,
"line": 1,
"imports": [],
"loc": {
"end": {
- "column": 16,
+ "column": 23,
"line": 1,
- "offset": 15,
+ "offset": 22,
},
- "source": "<template><div id=\\"abc",
- "source": "<template><div ",
++ "source": "<template><div id="abc",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<template><div id=\\"abc",
++ "source": "<template><div id="abc",
"temps": 0,
"type": 0,
}
"cached": 0,
"children": [
{
- "children": [
- {
- "children": [],
- "codegenNode": undefined,
- "isSelfClosing": false,
- "loc": {
- "end": {
- "column": 15,
- "line": 1,
- "offset": 14,
- },
- "source": "<div",
- "start": {
- "column": 11,
- "line": 1,
- "offset": 10,
- },
- },
- "ns": 0,
- "props": [],
- "tag": "div",
- "tagType": 0,
- "type": 1,
- },
- ],
+ "children": [],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 15,
+ "column": 25,
"line": 1,
- "offset": 14,
+ "offset": 24,
},
- "source": "<template><div id=\\"abc\\"",
- "source": "<template><div",
++ "source": "<template><div id="abc"",
"start": {
"column": 1,
"line": 1,
"imports": [],
"loc": {
"end": {
- "column": 15,
+ "column": 24,
"line": 1,
- "offset": 14,
+ "offset": 23,
},
- "source": "<template><div id=\\"abc\\"",
- "source": "<template><div",
++ "source": "<template><div id="abc"",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<template><div id=\\"abc\\"",
++ "source": "<template><div id="abc"",
"temps": 0,
"type": 0,
}
},
],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 19,
+ "column": 26,
"line": 1,
- "offset": 18,
+ "offset": 25,
},
- "source": "<template><div id=\\"abc\\"/",
- "source": "<template><div id ",
++ "source": "<template><div id="abc"/",
"start": {
"column": 1,
"line": 1,
"imports": [],
"loc": {
"end": {
- "column": 19,
+ "column": 25,
"line": 1,
- "offset": 18,
+ "offset": 24,
},
- "source": "<template><div id=\\"abc\\"/",
- "source": "<template><div id ",
++ "source": "<template><div id="abc"/",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<template><div id=\\"abc\\"/",
++ "source": "<template><div id="abc"/",
"temps": 0,
"type": 0,
}
{
"children": [],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 24,
+ "column": 30,
"line": 1,
- "offset": 23,
+ "offset": 29,
},
- "source": "<div a\\"bc=''></div>",
- "source": "<div id=abc /",
++ "source": "<div a"bc=''></div>",
"start": {
"column": 11,
"line": 1,
{
"loc": {
"end": {
- "column": 22,
+ "column": 23,
"line": 1,
- "offset": 21,
+ "offset": 22,
},
- "source": "a\\"bc=''",
- "source": "id=abc",
++ "source": "a"bc=''",
+ "start": {
+ "column": 16,
+ "line": 1,
+ "offset": 15,
+ },
+ },
- "name": "a\\"bc",
++ "name": "a"bc",
+ "nameLoc": {
+ "end": {
+ "column": 20,
+ "line": 1,
+ "offset": 19,
+ },
- "source": "a\\"bc",
++ "source": "a"bc",
"start": {
"column": 16,
"line": 1,
},
],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 24,
+ "column": 41,
"line": 1,
- "offset": 23,
+ "offset": 40,
},
- "source": "<template><div a\\"bc=''></div></template>",
- "source": "<template><div id=abc /",
++ "source": "<template><div a"bc=''></div></template>",
"start": {
"column": 1,
"line": 1,
"imports": [],
"loc": {
"end": {
- "column": 24,
+ "column": 41,
"line": 1,
- "offset": 23,
+ "offset": 40,
},
- "source": "<template><div a\\"bc=''></div></template>",
- "source": "<template><div id=abc /",
++ "source": "<template><div a"bc=''></div></template>",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<template><div a\\"bc=''></div></template>",
++ "source": "<template><div a"bc=''></div></template>",
"temps": 0,
"type": 0,
}
{
"children": [
{
- "content": "",
+ "children": [],
+ "codegenNode": undefined,
"loc": {
"end": {
- "column": 14,
+ "column": 31,
"line": 1,
- "offset": 13,
+ "offset": 30,
},
- "source": "<div foo=bar\\"></div>",
- "source": "<!>",
++ "source": "<div foo=bar"></div>",
"start": {
"column": 11,
"line": 1,
"offset": 10,
},
},
- "type": 3,
+ "ns": 0,
+ "props": [
+ {
+ "loc": {
+ "end": {
+ "column": 24,
+ "line": 1,
+ "offset": 23,
+ },
- "source": "foo=bar\\"",
++ "source": "foo=bar"",
+ "start": {
+ "column": 16,
+ "line": 1,
+ "offset": 15,
+ },
+ },
+ "name": "foo",
+ "nameLoc": {
+ "end": {
+ "column": 19,
+ "line": 1,
+ "offset": 18,
+ },
+ "source": "foo",
+ "start": {
+ "column": 16,
+ "line": 1,
+ "offset": 15,
+ },
+ },
+ "type": 6,
+ "value": {
- "content": "bar\\"",
++ "content": "bar"",
+ "loc": {
+ "end": {
+ "column": 24,
+ "line": 1,
+ "offset": 23,
+ },
- "source": "bar\\"",
++ "source": "bar"",
+ "start": {
+ "column": 20,
+ "line": 1,
+ "offset": 19,
+ },
+ },
+ "type": 2,
+ },
+ },
+ ],
+ "tag": "div",
+ "tagType": 0,
+ "type": 1,
},
],
"codegenNode": undefined,
- "isSelfClosing": false,
"loc": {
"end": {
- "column": 25,
+ "column": 42,
"line": 1,
- "offset": 24,
+ "offset": 41,
},
- "source": "<template><div foo=bar\\"></div></template>",
- "source": "<template><!></template>",
++ "source": "<template><div foo=bar"></div></template>",
"start": {
"column": 1,
"line": 1,
"imports": [],
"loc": {
"end": {
- "column": 25,
+ "column": 42,
"line": 1,
- "offset": 24,
+ "offset": 41,
},
- "source": "<template><div foo=bar\\"></div></template>",
- "source": "<template><!></template>",
++ "source": "<template><div foo=bar"></div></template>",
"start": {
"column": 1,
"line": 1,
"offset": 0,
},
},
- "source": "<template><div foo=bar\\"></div></template>",
++ "source": "<template><div foo=bar"></div></template>",
"temps": 0,
"type": 0,
}