File tree 1 file changed +28
-0
lines changed
packages/compiler-core/__tests__
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,34 @@ describe('compiler: parse', () => {
410
410
}
411
411
} )
412
412
} )
413
+
414
+ test ( 'custom delimiters' , ( ) => {
415
+ const ast = parse ( '<p>{msg}</p>' , {
416
+ delimiters : [ '{' , '}' ]
417
+ } )
418
+ const element = ast . children [ 0 ] as ElementNode
419
+ const interpolation = element . children [ 0 ] as InterpolationNode
420
+
421
+ expect ( interpolation ) . toStrictEqual ( {
422
+ type : NodeTypes . INTERPOLATION ,
423
+ content : {
424
+ type : NodeTypes . SIMPLE_EXPRESSION ,
425
+ content : `msg` ,
426
+ isStatic : false ,
427
+ isConstant : false ,
428
+ loc : {
429
+ start : { offset : 4 , line : 1 , column : 5 } ,
430
+ end : { offset : 7 , line : 1 , column : 8 } ,
431
+ source : 'msg'
432
+ }
433
+ } ,
434
+ loc : {
435
+ start : { offset : 3 , line : 1 , column : 4 } ,
436
+ end : { offset : 8 , line : 1 , column : 9 } ,
437
+ source : '{msg}'
438
+ }
439
+ } )
440
+ } )
413
441
} )
414
442
415
443
describe ( 'Comment' , ( ) => {
You can’t perform that action at this time.
0 commit comments