Skip to content

Mark multiline HTML comments as such #1896

@bjones1

Description

@bjones1

Thanks for the great work on Pygments! I use it regularly and am amazed by the breadth of languages it supports.

The current HTML lexer marks HTML comment as the token.Comment class, instead of the more specific token.Comment.Multiline. It also pushes into a sub-state which marks various flavors of embedded comments as token.Comment as well.

Would it be possible to replace this line with (r'<!--(.|\n)*?-->', Comment.Multiline), to mark all HTML comments as multi-line? The comment sub-state seems (to me) mostly useless, since it seems to mark everything as a token.Comment. I assume it can be removed?

Metadata

Metadata

Assignees

Labels

A-lexingarea: changes to individual lexers

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions