children: [{ type: NodeTypes.TEXT, content: `{{ number ` }],
},
])
+
+ const ast3 = baseParse(`<div v-pre><textarea>{{ foo </textarea></div>`, {
+ parseMode: 'html',
+ })
+ expect((ast3.children[0] as ElementNode).children).toMatchObject([
+ {
+ type: NodeTypes.ELEMENT,
+ children: [
+ {
+ type: NodeTypes.TEXT,
+ content: `{{ foo `,
+ },
+ ],
+ },
+ ])
})
test('self-closing v-pre', () => {
// We have to parse entities in <title> and <textarea> tags.
if (!__BROWSER__ && c === CharCodes.Amp) {
this.startEntity()
- } else if (c === this.delimiterOpen[0]) {
+ } else if (!this.inVPre && c === this.delimiterOpen[0]) {
// We also need to handle interpolation
this.state = State.InterpolationOpen
this.delimiterIndex = 0