Skip to content

Fix eiffel regex performance#1658

Merged
birkenfeld merged 1 commit intopygments:masterfrom
brondsem:eiffel_regex_improvement
Feb 12, 2021
Merged

Fix eiffel regex performance#1658
birkenfeld merged 1 commit intopygments:masterfrom
brondsem:eiffel_regex_improvement

Conversation

@brondsem
Copy link
Copy Markdown
Contributor

I encountered a certain eiffel file that performed extremely poorly with this regex. (I can share an example if desired, I'm not sure what proper etiquette is).

This change avoids the performance problem, and output is unchanged for the example.e file and a few other .e files I tested. I am not very experienced with eiffel language syntax, but as far as I can tell this is an okay change to make.

Copy link
Copy Markdown
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

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

This change is totally fine, [^\]%] already includes \n.

@birkenfeld birkenfeld merged commit f57cc9b into pygments:master Feb 12, 2021
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Feb 14, 2021
@Anteru Anteru added this to the 2.8 milestone Feb 14, 2021
@Anteru Anteru self-assigned this Feb 14, 2021
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants