10000 twigjs too lenient with spaces in included paths · Issue #355 · twigjs/twig.js · GitHub
[go: up one dir, main page]

Skip to content

twigjs too lenient with spaces in included paths #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
olets opened this issue May 3, 2016 · 4 comments · Fixed by #824
Closed

twigjs too lenient with spaces in included paths #355

olets opened this issue May 3, 2016 · 4 comments · Fixed by #824

Comments

@olets
Copy link
Member
olets commented May 3, 2016

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
Copy link
Member Author
olets commented May 3, 2016

We'll see what people think twigphp/Twig#2030

@dave-irvine
Copy link
Contributor

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

@willrowe
Copy link
Collaborator

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.

@olets
Copy link
Member Author
olets commented Sep 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0