Fix quoted string containing comment character by sblondon · Pull Request #2767 · pygments/pygments

Conversation

@sblondon

The comment character ('#' or ';') included in a quoted value does not be interpreted as beginning of comment but as a character of the quoted value.

This PR fixes #2720.

The comment character ('#' or ';') included in a quoted value does not be interpreted as beginning of comment but as a character of the quoted value.

kartben

'value1' Literal.String
'"' Literal.String
'\n ' Text.Whitespace
'key 2 = ' Literal.String

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually highlighting a bug in the current implementation, right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Thanks for spotting this. Tracked in #2835

Labels

A-lexing

area: changes to individual lexers