Skip to content

feat: add a compat entrypoint for portable regex support#71

Open
Huxpro wants to merge 2 commits intochenglou:mainfrom
Huxpro:codex/primjs-safe-main
Open

feat: add a compat entrypoint for portable regex support#71
Huxpro wants to merge 2 commits intochenglou:mainfrom
Huxpro:codex/primjs-safe-main

Conversation

@Huxpro
Copy link
Copy Markdown

@Huxpro Huxpro commented Apr 1, 2026

Summary

  • keep the default entrypoint on the original Unicode property regex literals
  • add a new @chenglou/pretext/compat entrypoint for engines that cannot parse \p{...} literals
  • cover the new subpath with tests and verify it matches the default layout behavior

Why

Some runtimes fail while parsing Unicode property regex literals, before any feature detection can run. A separate compat entrypoint avoids changing the default browser bundle while still giving hosts like Lynx a portable option.

Verification

  • bun test src/layout.test.ts
  • bun x tsc -p tsconfig.build.json

@Huxpro Huxpro changed the title fix: avoid Unicode property escape parse failures feat: add a compat entrypoint for portable regex support Apr 1, 2026
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.

1 participant