You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #859 [TwigComponent] Fixing bug where traditional blocks aren't handled correctly (weaverryan)
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
[TwigComponent] Fixing bug where traditional blocks aren't handled correctly
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Tickets | Fixes part of #844 (comment)
| License | MIT
Using `{% block traditional_block %}` inside of a `<twig:Component` syntax should now work. However, even though I tried to make the TwigPreLexer a bit more intelligent than just a regex parser, it's reaching its limits of complexity. Even this fix will break down if the user adds extra whitespace - e.g. `{% block traditional_block %}`. It's likely that `TwigPreLexer` will need to be converted to an actual Lexer -> token stream -> parser type of a system. On the bright side, that would make it easier to integrate into Twig core if we ever chose to do that (the parser wouldn't convert over directly, but the lexer & tokens in theory would).
Cheers!
Commits
-------
2ca9430 [TwigComponent] Fixing bug where traditional blocks aren't handled correctly
0 commit comments