Skip to content

fix(rules): ensure lookbehind regex is evaluated correctly by minifiers#3945

Open
christophe-g wants to merge 2 commits intomarkedjs:masterfrom
accessibleSurveys:fix-minifier-break-lookbehind-regex
Open

fix(rules): ensure lookbehind regex is evaluated correctly by minifiers#3945
christophe-g wants to merge 2 commits intomarkedjs:masterfrom
accessibleSurveys:fix-minifier-break-lookbehind-regex

Conversation

@christophe-g
Copy link
Copy Markdown

Use a default variable in the regex to prevent removal by minifiers.

This is a very minor change that fix #3944 downstream

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

@christophe-g is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the supportsLookbehind detection logic in src/rules.ts by introducing a default parameter to the detection function. This change prevents minifiers from potentially removing the regex evaluation during build-time optimization, ensuring the feature detection occurs correctly at runtime. There were no review comments provided, and I have no additional feedback to provide.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marked-website Ready Ready Preview, Comment Apr 9, 2026 1:36pm

Request Review

Copy link
Copy Markdown
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

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

Thanks 💯

@UziTech UziTech requested review from calculuschild and styfle April 10, 2026 06:04
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.

SyntaxError: Invalid regular expression: invalid group specifier name in Safari < 16.4

2 participants