Skip to content

Comments highlighting / parsing  #31

@paulhenri

Description

@paulhenri

Hi,
The following issue occurs with neovim, i can't speak for other editors.

We have issues when using this form of comments <% # Some comment %> instead of this form <%# Some comment %>
If we pass on the comment line every following lines are seens as a comment (See picture below)
image

We tried to tweak to the parser to handle this case by changing the _hash_comment function like so :

_hash_comment: ($) => seq(/<%[\s]*#/, prec.left(seq(repeat($._code), "%>"))),

Parsing tests do work fine with this function, even with changed cases to reflect the change but highlights one do not :

Error in query file "highlights.scm"
Caused by:
    Query error at 11:4. Invalid node type

We are willing to make a Pull request to change this behavior once it works we are just looking for some hints or direction to solve the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions