fix(parser): should reset inRCDATA state
This commit is contained in:
parent
7d89887f71
commit
ef97e8b07d
|
@ -1952,6 +1952,12 @@ describe('compiler: parse', () => {
|
|||
})
|
||||
})
|
||||
|
||||
// edge case found in vue-macros where the input is TS or JSX
|
||||
test('should reset inRCDATA state', () => {
|
||||
baseParse(`<Foo>`, { parseMode: 'sfc', onError() {} })
|
||||
expect(() => baseParse(`{ foo }`)).not.toThrow()
|
||||
})
|
||||
|
||||
describe('decodeEntities option', () => {
|
||||
test('use decode by default', () => {
|
||||
const ast: any = baseParse('><&'"&foo;')
|
||||
|
|
|
@ -271,6 +271,7 @@ export default class Tokenizer {
|
|||
this.sectionStart = 0
|
||||
this.index = 0
|
||||
this.baseState = State.Text
|
||||
this.inRCDATA = false
|
||||
this.currentSequence = undefined!
|
||||
this.newlines.length = 0
|
||||
this.delimiterOpen = defaultDelimitersOpen
|
||||
|
|
Loading…
Reference in New Issue