@@ -30,10 +30,7 @@ public function __construct(int $startingLine = 1)
3030 $ this ->line = $ startingLine ;
3131 }
3232
33- /**
34- * @param bool $insideOfBlock Are we sub-parsing the content inside a block?
35- */
36- public function preLexComponents (string $ input , bool $ insideOfBlock = false ): string
33+ public function preLexComponents (string $ input ): string
3734 {
3835 $ this ->input = $ input ;
3936 $ this ->length = \strlen ($ input );
@@ -79,11 +76,10 @@ public function preLexComponents(string $input, bool $insideOfBlock = false): st
7976 continue ;
8077 }
8178
82- // if we're already inside a component, and we're not inside a block,
79+ // if we're already inside a component,
8380 // *and* we've just found a new component, then we should try to
8481 // open the default block
85- if (!$ insideOfBlock
86- && !empty ($ this ->currentComponents )
82+ if (!empty ($ this ->currentComponents )
8783 && !$ this ->currentComponents [\count ($ this ->currentComponents ) - 1 ]['hasDefaultBlock ' ]) {
8884 $ output .= $ this ->addDefaultBlock ();
8985 }
@@ -365,7 +361,7 @@ private function consumeBlock(string $componentName): string
365361 $ blockContents = $ this ->consumeUntilEndBlock ();
366362
367363 $ subLexer = new self ($ this ->line );
368- $ output .= $ subLexer ->preLexComponents ($ blockContents, true );
364+ $ output .= $ subLexer ->preLexComponents ($ blockContents );
369365
370366 $ this ->consume ($ closingTag );
371367 $ output .= '{% endblock %} ' ;
0 commit comments