Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elpi: fix catastrophic backtracking #2061

Merged
merged 1 commit into from
Feb 3, 2022
Merged

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Feb 3, 2022

Closes #2053

pygments/lexers/elpi.py Outdated Show resolved Hide resolved
Copy link
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.

The reformatting makes it basically impossible to see what has really changed.

Please don't apply black to the Pygments codebase, as you can see we have a pretty different style.

@jeanas
Copy link
Contributor Author

jeanas commented Feb 3, 2022

The reformatting makes it basically impossible to see what has really changed.

Please don't apply black to the Pygments codebase, as you can see we have a pretty different style.

OK, I'll back the formatting out. Note, though, that it is in a separate commit for the purpose of review (I've been trained rigorously to use atomic commits, but maybe that is not usual here?).

@birkenfeld
Copy link
Member

As far as I can see, the formatting changes in the first commit ("minor changes") which also has a bunch of other (useful) things?

@birkenfeld
Copy link
Member

I've been trained rigorously to use atomic commits, but maybe that is not usual here?

Of course it's useful, but even with atomic commits I wouldn't expect to see a wholesale reformatting in a PR to fix a bug :-)

@jeanas
Copy link
Contributor Author

jeanas commented Feb 3, 2022

I have refactored this PR to include only the bugfix.

@birkenfeld birkenfeld self-requested a review February 3, 2022 21:26
Copy link
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.

Thanks a lot!

@birkenfeld birkenfeld merged commit dbd7931 into pygments:master Feb 3, 2022
@Anteru Anteru added this to the 2.12.0 milestone Feb 20, 2022
@jeanas jeanas deleted the elpi branch September 1, 2023 16:51
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.

Elpi lexer has pathological backtracking
4 participants