@@ -87,7 +87,7 @@ describe('text compiler', () => {
8787 expect ( alignment ) . to . equal ( 1 ) ;
8888 expect ( pos ) . to . deep . equal ( { x : 1 , y : 2 } ) ;
8989 expect ( org ) . to . deep . equal ( { x : 1 , y : 2 } ) ;
90- expect ( move ) . to . deep . equal ( { x1 : 1 , y1 : 2 , x2 : 3 , y2 : 4 , t1 : 0 , t2 : 0 } ) ;
90+ expect ( move ) . to . deep . equal ( undefined ) ;
9191 expect ( fade ) . to . deep . equal ( { type : 'fad' , t1 : 1 , t2 : 2 } ) ;
9292 expect ( clip ) . to . deep . equal ( {
9393 inverse : false ,
@@ -103,6 +103,13 @@ describe('text compiler', () => {
103103 expect ( test3 . q ) . to . equal ( 2 ) ;
104104 } ) ;
105105
106+ it ( 'should only respect the first \\pos or \\move tag' , ( ) => {
107+ const { parsed } = parseText ( '{\\move(1,2,3,4)\\pos(5,6)}bla' ) ;
108+ const { pos, move } = compileText ( { styles, style, parsed } ) ;
109+ expect ( move ) . to . deep . equal ( { x1 : 1 , y1 : 2 , x2 : 3 , y2 : 4 , t1 : 0 , t2 : 0 } ) ;
110+ expect ( pos ) . to . deep . equal ( undefined ) ;
111+ } ) ;
112+
106113 it ( 'should compile text with \\r' , ( ) => {
107114 const { parsed } = parseText ( '{\\fr30}a{\\r}b{\\fr60}c{\\ralt}d' ) ;
108115 const { slices } = compileText ( { styles, style, parsed } ) ;
0 commit comments