Skip to content

Fix escaping of non-alphanumeric characters in python regexes - #547

Merged
andreasabel merged 1 commit into
BNFC:masterfrom
HadrienRenaud:fix-pygments-caret
Mar 12, 2026
Merged

andreasabel merged 1 commit into
BNFC:masterfrom
HadrienRenaud:fix-pygments-caret

Conversation

@HadrienRenaud

Copy link
Copy Markdown
Contributor

Not all special characters where correctly escaped when exporting python regexes. This is a problem if your parsed language uses $ or ^ as operators.

@andreasabel andreasabel added Pygments Issues of the Pygments backend labels Mar 12, 2026
@andreasabel andreasabel modified the milestone: 2.9.6.3 Mar 12, 2026

@andreasabel andreasabel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@andreasabel
andreasabel merged commit f679664 into BNFC:master Mar 12, 2026
39 of 40 checks passed
@HadrienRenaud
HadrienRenaud deleted the fix-pygments-caret branch March 12, 2026 11:27
@Commelina Commelina linked an issue Mar 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pygments Issues of the Pygments backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pygments backend is generating regex with unescaped symbol

2 participants