@@ -30,10 +30,7 @@ public function __construct(int $startingLine = 1)
30
30
$ this ->line = $ startingLine ;
31
31
}
32
32
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
37
34
{
38
35
$ this ->input = $ input ;
39
36
$ this ->length = \strlen ($ input );
@@ -79,11 +76,10 @@ public function preLexComponents(string $input, bool $insideOfBlock = false): st
79
76
continue ;
80
77
}
81
78
82
- // if we're already inside a component, and we're not inside a block,
79
+ // if we're already inside a component,
83
80
// *and* we've just found a new component, then we should try to
84
81
// open the default block
85
- if (!$ insideOfBlock
86
- && !empty ($ this ->currentComponents )
82
+ if (!empty ($ this ->currentComponents )
87
83
&& !$ this ->currentComponents [\count ($ this ->currentComponents ) - 1 ]['hasDefaultBlock ' ]) {
88
84
$ output .= $ this ->addDefaultBlock ();
89
85
}
@@ -365,7 +361,7 @@ private function consumeBlock(string $componentName): string
365
361
$ blockContents = $ this ->consumeUntilEndBlock ();
366
362
367
363
$ subLexer = new self ($ this ->line );
368
- $ output .= $ subLexer ->preLexComponents ($ blockContents, true );
364
+ $ output .= $ subLexer ->preLexComponents ($ blockContents );
369
365
370
366
$ this ->consume ($ closingTag );
371
367
$ output .= '{% endblock %} ' ;
0 commit comments