Skip to content

Parsing fails for {% comment %} including number within HTML tag #143

Open
@vekerdyb

Description

Describe the bug

Parsing fails for {% comment %} including number within HTML tag.

Environment

OSX 12.6

Python 3.10.6

curlylint 0.13.1

Steps to reproduce

  1. Create the template:
    <div
        {% comment %}
            1
        {% endcomment %}
    ></div> 
  2. Then, run curlylint on it

Expected behavior

Should pass, similarly to this version, without a number (which passes as expected):

<div
    {% comment %}
        A
    {% endcomment %}
></div> 

Actual behavior

Fails with:

$ curlylint --verbose /project/template.html
Identified project root as: /project
Analyzing file content from stdin
Files being analyzed:
/project/template.html
/project/template.html
2:8     Parse error: expected one of '>', 'attribute', '{#', '{%', '{{' at 2:8  parse_error

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