Skip to content

Aggressively reduce backtracking in CSS parsing regex logic - #300

Draft
facelessuser wants to merge 1 commit into
mainfrom
feature/atomic
Draft

Aggressively reduce backtracking in CSS parsing regex logic#300
facelessuser wants to merge 1 commit into
mainfrom
feature/atomic

Conversation

@facelessuser

Copy link
Copy Markdown
Owner

Use Atomic groups and possessive quantifiers to reduce backtracking. In most cases, only minimal backtracking is really required. Rework patterns so that most of them grab what they need and pass or fail.

@gir-bot gir-bot added S: needs-review Needs to be reviewed and/or approved. C: css-parsing Related to CSS parsing. C: docs Related to documentation. C: infrastructure Related to project infrastructure. C: source Related to source code. labels Aug 15, 2026
Use Atomic groups and possessive quantifiers to reduce backtracking.
In most cases, only minimal backtracking is really required. Rework
patterns so that most of them grab what they need and pass or fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: css-parsing Related to CSS parsing. C: docs Related to documentation. C: infrastructure Related to project infrastructure. C: source Related to source code. S: needs-review Needs to be reviewed and/or approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants