Skip to content

Parser fails on comment containing HTML tag #148

Open
@gasman

Description

@gasman

Describe the bug

An unmatched HTML tag inside a {% comment %} block raises the error

Parse error: expected one of 'autoescape', 'block', 'blocktrans', 'comment', 'filter', 'for', 'if', 'ifchanged', 'ifequal', 'ifnotequal', 'not an intermediate Jinja tag name', 'spaceless', 'verbatim', 'with'.

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

comment, parse error

#74 is similar but not identical.

Environment

curlylint 0.13.1, python 3.11.1, MacOS 11.7.3

Steps to reproduce

Create a new folder containing a file test.html:

{% comment %}
    there is an <interesting> tag here
{% endcomment %}

Run curlylint --parse-only .

Expected behavior

Linting should pass with no errors

Actual behavior

Error reported:

test.html
2: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 2:3	parse_error

Oh no! 💥 💔 💥
1 error reported

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions