Repository navigation
fix: preserve fallback emoji highlights and complete cleanup - #42
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Unicode/highlighting check found a fallback bug: when Fixed by sharing fallback boundaries between source mapping and end guards, consuming emoji ZWJ sequences and pairing regional indicators without merging adjacent flags. Added regression coverage with |
… size consolidation - highlight.ts: GB9a tone attach + GB11 Extend*ZWJ loop, shared cluster spans via isClusterContinuation so component queries highlight the whole sequence (laptop in woman-technologist, tone in thumbs-up); ASCII Sk gate keeps a`b 1:1; sticky /yu regexes without ^ anchor. - check-parity-lint.ts: auto-allow 0x80 ASCII fast-path (was 0x7f only), fixing CI 'banned charCodeAt at line 301'. - run-all/run-fuzzy-benchmark.ts: consume BENCHMARK_DATASET_SIZES so scripts/bench-data is the single size definition. - test-highlight.ts: keycap/VS16/pirate/full-cluster fallback cases. - IMPROVEMENT-PLAN.md: drop dangling memory-note reference.
Summary
When
Intl.Segmenteris unavailable, highlights could split joined emoji and flags: matching 💻 inside 👩💻 produced👩<mark>💻</mark>. Share fallback boundaries between source mapping and end guards so component matches highlight the whole emoji or flag, while adjacent sequences stay separate. Add fallback regressions, code comments, public API documentation, plan notes, and a patch changeset.Also complete Phase 1 cleanup: consolidate interactive dataset sizes in
scripts/bench-data/dataset-sizes.tswhile preserving existing options and defaults; move frozen snapshot artifacts todocs/benchmarks/and update their runner, checks, and references; delete the two finished plans and stale references.Fixes #38
Validation
bun run test:highlight(fallback disabled-segmenter cases plus normal suite)bun run test:normalizationandbun run test:normalization:tr(98 checks each)bun run check:shaders,bun run typecheck,bun run build,bun run test:mockbun run test:benchmarks(82 checks for the cleanup)The fallback protects these emoji boundaries; it remains a targeted fallback rather than a complete Unicode grapheme segmentation implementation.