File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2019,6 +2019,21 @@ describe('compiler: parse', () => {
2019
2019
children : [ { type : NodeTypes . TEXT , content : `{{ number ` } ] ,
2020
2020
} ,
2021
2021
] )
2022
+
2023
+ const ast3 = baseParse ( `<div v-pre><textarea>{{ foo </textarea></div>` , {
2024
+ parseMode : 'html' ,
2025
+ } )
2026
+ expect ( ( ast3 . children [ 0 ] as ElementNode ) . children ) . toMatchObject ( [
2027
+ {
2028
+ type : NodeTypes . ELEMENT ,
2029
+ children : [
2030
+ {
2031
+ type : NodeTypes . TEXT ,
2032
+ content : `{{ foo ` ,
2033
+ } ,
2034
+ ] ,
2035
+ } ,
2036
+ ] )
2022
2037
} )
2023
2038
2024
2039
test ( 'self-closing v-pre' , ( ) => {
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ export default class Tokenizer {
438
438
// We have to parse entities in <title> and <textarea> tags.
439
439
if ( ! __BROWSER__ && c === CharCodes . Amp ) {
440
440
this . startEntity ( )
441
- } else if ( c === this . delimiterOpen [ 0 ] ) {
441
+ } else if ( ! this . inVPre && c === this . delimiterOpen [ 0 ] ) {
442
442
// We also need to handle interpolation
443
443
this . state = State . InterpolationOpen
444
444
this . delimiterIndex = 0
You can’t perform that action at this time.
0 commit comments