Skip to content

feat: highlight fenced code by language on mobile and desktop - #698

Merged
huichen merged 4 commits into
mainfrom
feat/mobile-code-highlight
Sep 17, 2026
Merged

huichen merged 4 commits into
mainfrom
feat/mobile-code-highlight

Conversation

@huichen

@huichen huichen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add native selectable Prism highlighting to mobile fenced code, including TSX/JSX, TypeScript, Python, Rust, JSON and shell.
  • Preserve virtualized scrolling, source copying and multiline grammar context. Unknown languages and excessive input/token counts fall back to plain text.
  • Use the full Shiki language registry on desktop with canonical aliases and lazy loading.
  • Preserve blank lines, indentation and original newline sequences in desktop highlighted code.

Validation

  • Mobile TypeScript, ESLint and full Jest suite passed.
  • Desktop TypeScript, ESLint, 134 Vitest suites / 1141 tests and production build passed.
  • Android/iOS Metro exports including Hermes bytecode passed.
  • Real desktop CodeBlock browser checks passed: six highlighted examples, exact source/newlines, unknown-language fallback.
  • No Tauri or phone-device runtime validation. Existing light-theme surfaces retained; no WebView or native dependency added.

@huichen
huichen enabled auto-merge (squash) September 17, 2026 06:34
@huichen
huichen merged commit e8fa839 into main Sep 17, 2026
12 checks passed
@huichen
huichen deleted the feat/mobile-code-highlight branch September 17, 2026 06:45
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