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

Improve Java properties lexer #2404

Merged
merged 1 commit into from Apr 17, 2023
Merged

Improve Java properties lexer #2404

merged 1 commit into from Apr 17, 2023

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Apr 5, 2023

Use special lexer rules for escapes; fixes catastrophic backtracking, and highlights them too. (Also change Operator to Punctuation for the key/value separator.)

Fixes #2356

@Anteru
Copy link
Collaborator

Anteru commented Apr 15, 2023

The change looks good, but could you please elaborate why operator -> punctuation? = feels like an operator to me.

Use special lexer rules for escapes; fixes catastrophic backtracking,
and highlights them too.

Fixes pygments#2356
@jeanas
Copy link
Contributor Author

jeanas commented Apr 17, 2023

Hmm, ok, convinced :) I've changed it back.

@Anteru Anteru self-requested a review April 17, 2023 17:55
@jeanas jeanas merged commit fdf182a into pygments:master Apr 17, 2023
15 checks passed
@jeanas jeanas deleted the properties branch April 17, 2023 18:14
@Anteru Anteru added the A-lexing area: changes to individual lexers label Apr 17, 2023
@Anteru Anteru added this to the 2.15.1 milestone Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catastrophic backtracking on Java's properties Lexer
2 participants