twig.js icon indicating copy to clipboard operation
twig.js copied to clipboard

twigjs too lenient with spaces in included paths

Open olets opened this issue 8 years ago • 2 comments

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)

olets avatar May 03 '16 16:05 olets

We'll see what people think https://github.com/twigphp/Twig/issues/2030

olets avatar May 03 '16 16:05 olets

Ok so I guess the easiest "fix" here would be to consider anything inside quotes to be literal.

dave-irvine avatar May 04 '16 07:05 dave-irvine

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 avatar Aug 31 '22 15:08 willrowe

@willrowe I'm thrilled that you've been triaging so many old issues!! 🏆 🏅 👏

olets avatar Sep 06 '22 17:09 olets