@@ -532,12 +532,12 @@ protected static function token(array &$token, Context $context): string|array|n
532532 [$ raw , $ vars ] = Parser::parse ($ token , $ context );
533533
534534 // Handle spacing (standalone tags, partial indent)
535- static ::spacing ($ token , $ context , (( $ token [Token::POS_OP ] === '' ) || ( $ token [Token::POS_OP ] === '& ' )) && (!isset ($ vars [0 ][0 ]) || ( $ vars [0 ][0 ] !== 'else ' ) ) || $ context ->options ->ignoreStandalone );
535+ static ::spacing ($ token , $ context , ($ token [Token::POS_OP ] === '' || $ token [Token::POS_OP ] === '& ' ) && (!isset ($ vars [0 ][0 ]) || $ vars [0 ][0 ] !== 'else ' ) || $ context ->options ->ignoreStandalone );
536536
537- $ inlinepartial = static ::inlinePartial ($ context , $ vars );
538- $ partialblock = static ::partialBlock ($ context , $ vars );
537+ $ inlinePartial = static ::inlinePartial ($ context , $ vars );
538+ $ partialBlock = static ::partialBlock ($ context , $ vars );
539539
540- if ($ partialblock || $ inlinepartial ) {
540+ if ($ partialBlock || $ inlinePartial ) {
541541 $ context ->stack = array_slice ($ context ->stack , 0 , -4 );
542542 static ::pushPartial ($ context , $ context ->currentToken [Token::POS_LOTHER ] . $ context ->currentToken [Token::POS_LSPACE ] . Token::toString ($ context ->currentToken ));
543543 $ context ->currentToken [Token::POS_LOTHER ] = '' ;
@@ -765,13 +765,14 @@ protected static function spacing(array &$token, Context $context, bool $nost =
765765 || ($ lsp && !$ token [Token::POS_ROTHER ]) // final line
766766 )) {
767767 // handle partial
768+ $ leftSpace = isset ($ lmatch [2 ]) ? ($ lmatch [1 ] . $ lmatch [2 ]) : '' ;
768769 if ($ token [Token::POS_OP ] === '> ' ) {
769770 if (!$ context ->options ->preventIndent ) {
770771 $ context ->tokens ['partialind ' ] = $ token [Token::POS_LSPACECTL ] ? '' : $ ind ;
771- $ token [Token::POS_LSPACE ] = ( isset ( $ lmatch [ 2 ]) ? ( $ lmatch [ 1 ] . $ lmatch [ 2 ]) : '' ) ;
772+ $ token [Token::POS_LSPACE ] = $ leftSpace ;
772773 }
773774 } else {
774- $ token [Token::POS_LSPACE ] = ( isset ( $ lmatch [ 2 ]) ? ( $ lmatch [ 1 ] . $ lmatch [ 2 ]) : '' ) ;
775+ $ token [Token::POS_LSPACE ] = $ leftSpace ;
775776 }
776777 $ token [Token::POS_RSPACE ] = $ rmatch [3 ] ?? '' ;
777778 }
0 commit comments