twig.js
twig.js copied to clipboard
twigjs too lenient with spaces in included paths
twig.js recognizes {% include 'x.html ' %}
as meaning {% include 'x.html' %}
, but twig breaks on that extra whitespace.
(Seems pretty clear to me that leniency is the right way to go, but until twig can handle it twig.js shouldn't)
We'll see what people think https://github.com/twigphp/Twig/issues/2030
Ok so I guess the easiest "fix" here would be to consider anything inside quotes to be literal.
I created a couple of tests for this and was not able to get twig.js to load paths with trailing or leading whitespace if they did not exist. Something may have changed in the meantime to fix the issue. I will submit a PR tomorrow with the tests.
@willrowe I'm thrilled that you've been triaging so many old issues!! 🏆 🏅 👏