+10
-1
lines changedFilter options
+10
-1
lines changed Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ export function parseHTML (html, options) {
123
123
}
124
124
125
125
let text, rest, next
126
-
if (textEnd > 0) {
126
+
if (textEnd >= 0) {
127
127
rest = html.slice(textEnd)
128
128
while (
129
129
!endTag.test(rest) &&
Original file line number Diff line number Diff line change
@@ -78,6 +78,15 @@ describe('Single File Component parser', () => {
78
78
expect(res.template.content.trim()).toBe(`div\n h1(v-if='1 < 2') hello`)
79
79
})
80
80
81
+
it('should handle component contains "<" only', () => {
82
+
const res = parseComponent(`
83
+
<template>
84
+
<span><</span>
85
+
</template>
86
+
`)
87
+
expect(res.template.content.trim()).toBe(`<span><</span>`)
88
+
})
89
+
81
90
it('should handle custom blocks without parsing them', () => {
82
91
const res = parseComponent(`
83
92
<template>
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4