refactor(compiler): refine CDATA endTokens (#4459)
This commit is contained in:
parent
7178716b4c
commit
4502a0eab5
@ -989,10 +989,8 @@ function parseInterpolation(
|
||||
function parseText(context: ParserContext, mode: TextModes): TextNode {
|
||||
__TEST__ && assert(context.source.length > 0)
|
||||
|
||||
const endTokens = ['<', context.options.delimiters[0]]
|
||||
if (mode === TextModes.CDATA) {
|
||||
endTokens.push(']]>')
|
||||
}
|
||||
const endTokens =
|
||||
mode === TextModes.CDATA ? [']]>'] : ['<', context.options.delimiters[0]]
|
||||
|
||||
let endIndex = context.source.length
|
||||
for (let i = 0; i < endTokens.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user