mirror of
https://github.com/storytold/egui.git
synced 2026-11-20 01:22:21 +01:00
Improes non-`syntect` highlighter in `egui_extras::syntax_highlighting`. * `TokenType` is now public, with new `CodeTheme::format` and `CodeTheme::format_mut`, so apps can match the colors to their own theme * New `TokenType::Function`: an identifier directly followed by `(` * `/* block comments */` for C, C++, JavaScript, JSON and Rust * Backslash escapes in strings, so `"say \"hi\""` is one string * `'single'`, `"""triple"""` and `'''triple'''` strings in Python and TOML, `'char'` literals in C/C++, and `` `template` `` strings in JavaScript * New languages: JavaScript/TypeScript, shell (bash, sh, zsh) and YAML * `jsonc` and `json5` are now highlighted as JSON The demo snapshots are rendered with `--all-features`, which uses `syntect`, so they are unaffected. The new `egui_extras/tests/syntax_highlighting.rs` snapshot test covers the fallback highlighter, run by a new CI step without `syntect`. * [x] I have followed the instructions in the PR template This PR was written by Claude Code (an LLM) on behalf of @emilk, and needs a human review before leaving draft. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>