Skip to content

Lazy-load Ballerina highlighting behind the lookbehind check - #12018

Merged
iHiD merged 1 commit into
mainfrom
lazy-load-ballerina-highlighting
Oct 28, 2026
Merged

iHiD merged 1 commit into
mainfrom
lazy-load-ballerina-highlighting

Conversation

@iHiD

@iHiD iHiD commented Oct 28, 2026

Copy link
Copy Markdown
Member

The Ballerina highlight.js package contains a lookbehind regex literal. Safari before 16.4 cannot parse lookbehind, so the shared highlighting chunk failed to load on those browsers and took down every lazy component that imports utils/highlight. This was reported from Mobile Safari 15.6 on iOS 15.8.

This change loads Ballerina through a dynamic import after isLookbehindSupported() passes, the same way Red and Roc are loaded since #8647. A production build now puts Ballerina in its own chunk. The shared highlighting chunk only contains lookbehind inside strings, which are compiled behind the guard. The highlight jest tests pass.

Fixes EXERCISM-JS-N0.

Closes #10604

🤖 Generated with Claude Code

The Ballerina highlight.js package contains a lookbehind regex literal.
Safari before 16.4 cannot parse it, so the shared highlighting chunk
failed to load on those browsers. Ballerina now loads through a dynamic
import after isLookbehindSupported() passes, the same way Red and Roc do.

Fixes EXERCISM-JS-N0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iHiD
iHiD requested a review from dem4ron as a code owner October 28, 2026 12:04
@iHiD
iHiD merged commit 6ec341f into main Oct 28, 2026
29 checks passed
@iHiD
iHiD deleted the lazy-load-ballerina-highlighting branch October 28, 2026 12:21
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

1 participant