Skip to content
pi-c Check-in [f84ad487f5]
Login

Check-in [f84ad487f5]

Overview
Comment:TUI: a syntax highlighter for code blocks

src/tui/highlight.c colours fenced code with ANSI SGR using Pi's token classes and its dark and light theme colours: C and C++, shell, Python, JavaScript and TypeScript, JSON, Go, Rust, diff, Markdown, YAML and SQL, with a generic fallback. Linear, safe on arbitrary bytes (a random input test under ASan), every styled span closed before each newline so lines wrap on their own. Not wired into the renderer yet.

Timelines: family | ancestors | descendants | both | highlight
Files: files | file ages | folders
SHA3-256: f84ad487f54a06d5bb5dc56384f3474d97be3a83089f28804ff57d4d3f3bcdaf
User & Date: dmestas on 2026-11-19 23:12:08.001
Other Links: branch diff | manifest | tags
Context
2026-11-20
02:28
Merge trunk into the syntax highlighter check-in: f7b1bab2f5 user: dmestas tags: highlight
2026-11-19
23:12
TUI: a syntax highlighter for code blocks

src/tui/highlight.c colours fenced code with ANSI SGR using Pi's token classes and its dark and light theme colours: C and C++, shell, Python, JavaScript and TypeScript, JSON, Go, Rust, diff, Markdown, YAML and SQL, with a generic fallback. Linear, safe on arbitrary bytes (a random input test under ASan), every styled span closed before each newline so lines wrap on their own. Not wired into the renderer yet. check-in: f84ad487f5 user: dmestas tags: highlight

22:27
CI green on 1c97d5bf491f (docs only) check-in: 32ae0b410e user: dmestas tags: trunk
Changes