Skip to content
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

does not support whitespace control hyphens #11

Closed
revelt opened this issue Aug 28, 2018 · 6 comments
Closed

does not support whitespace control hyphens #11

revelt opened this issue Aug 28, 2018 · 6 comments

Comments

@revelt
Copy link
Contributor

revelt commented Aug 28, 2018

consider a file consisting of only:

{%- set z = true -%}

It is a valid expression in Jinja but currently jinjalint will swear about it:

index.html:1:2: Parse error: expected one of 'a letter', 'autoescape', 'block', 'blocktrans', 'comment', 'filter', 'for', 'if', 'ifchanged', 'ifequal', 'ifnotequal', 'spaceless', 'verbatim', 'with' at 0:2

I wonder if it's an issue or something's wrong with my install of jinjalint..

@motet-a
Copy link
Owner

motet-a commented Sep 3, 2018

This is an issue with jinjalint, currently I have tested it with Django's flavor of Jinja which doesn't support some Jinja features like this one. However this one is really easy to implement so I'll add support for it soon.

@revelt
Copy link
Contributor Author

revelt commented Sep 3, 2018

thank you, also, let's consider {{- at the same go, so both {%- and {{- would work

@motet-a
Copy link
Owner

motet-a commented Nov 4, 2018

@revelt I just published fa60351 in a new version on Pypi so these whitespace control hyphens and pluses should be handled properly.

@motet-a
Copy link
Owner

motet-a commented Nov 4, 2018

I’ll close the issue, but please let me know here if anything is going wrong.

@motet-a motet-a closed this as completed Nov 4, 2018
@revelt
Copy link
Contributor Author

revelt commented Nov 4, 2018

Good work! I just tried linting, it does pass, there's only a bunch of indentation errors (which I'll find out how to disable) but otherwise healthy files pass fine now. Thank you very much!

@motet-a
Copy link
Owner

motet-a commented Nov 5, 2018

I’m glad to hear that 🙂

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

2 participants