10000 spaceless in text file with LF-only EOL prints out [object Object] · Issue #689 · twigjs/twig.js · GitHub
[go: up one dir, main page]

Skip to content

spaceless in text file with LF-only EOL prints out [object Object] #689

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
dfinton opened this issue Dec 10, 2019 · 2 comments
Closed

spaceless in text file with LF-only EOL prints out [object Object] #689

dfinton opened this issue Dec 10, 2019 · 2 comments

Comments

@dfinton
Copy link
dfinton commented Dec 10, 2019

In a twig file containing CRLFs at the end of lines, the {% spaceless %}...{% endspaceless %} tags work as expected. In text files containing LF (no carriage return) only, the following output is observed:

[object Object]

Expected behavior: spaceless removes spaces regardless of the style of line feed in a text file
Actual behavior: spaceless adds the text [object Object] in the twig output text

Node version: 12.13.1
Twigjs version: 1.14.0

This is occurring under Linux.

@dfinton dfinton changed the title spaceless in text file with LF-only OEL prints out [object Object] spaceless in text file with LF-only EOL prints out [object Object] Dec 10, 2019
@maxhelias
Copy link
Contributor

Should be fixed by #690 with string escape and #702 without string escape

@willrowe
Copy link
Collaborator

Closing due to @maxhelias comment. If this is still not working correctly, please re-open and provide an example of it working in TwigPHP via Twigfiddle and it not working in twig.js using this template.

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

No branches or pull requests

3 participants
0