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

invalid parse error #74

Open
tisdall opened this issue Mar 29, 2021 · 1 comment
Open

invalid parse error #74

tisdall opened this issue Mar 29, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tisdall
Copy link

tisdall commented Mar 29, 2021

Describe the bug

I get a parse error when I don't believe one should happen. I don't really know what it's having an issue with though so unfortunately I can't be more descriptive.

Which terms did you search for in the documentation and issue tracker?

Tried searching for "comment", but switching the comment to an if gave the same issue so I'm unsure the problem.

Environment

curlylint==0.12.2 parsy==1.1.0 pathspec==0.8.1
attrs==19.3.0 click==7.0 toml==0.10.0

Python 3.8.3 on Mac OS 10.13.6

Steps to reproduce

I reduced my template to the smallest example that still exhibited the issue:

{% if page_type %}
    {% comment %} some comment {% endcomment %}
    <div>
{% endif %}

{% if page_type %}
    </div>
{% endif %}

If I remove the {% comment %} line than it passes as valid. If I change the comment to an if block I still see the issue. Single line {# #} also has the issue.

Expected behavior

Should clear as valid

Actual behavior

3:3	Parse error: expected one of 'autoescape', 'block', 'blocktrans', 'comment', 'filter', 'for', 'if', 'ifchanged', 'ifequal', 'ifnotequal', 'not an intermediate Jinja tag name', 'spaceless', 'verbatim', 'with' at 3:3	parse_error
@tisdall tisdall added the bug Something isn't working label Mar 29, 2021
@thatmatthewxu
Copy link

I had the same issue in v0.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants