Skip to content

Commit 8dbec33

Browse files
committed
fix(webui): default fenceless code blocks to plain text rendering
Language-less ASCII-art fences (diagrams, terminal output, plain text) were being heuristically tokenised by shiki/rehype-pretty-code, producing stripey per-line backgrounds and broken alignment because the highlighter guessed at keywords that were not there. Set rehype-pretty-code's `defaultLang: 'text'` so any fenced block without an explicit language renders as a uniform monospace block. Source markdown stays unchanged — no doc-side annotations needed. Verified locally against docs/agent/authentication.md: the client_credentials diagram now renders as a single contiguous block. See also #219 (view-source link on docs pages) and #220 (rewrite relative .md links in webui rendering).
1 parent 5e9d2c1 commit 8dbec33

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

webui/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export default defineConfig({
8181
{
8282
theme: 'github-dark',
8383
keepBackground: true,
84+
defaultLang: 'text',
8485
},
8586
],
8687
],

0 commit comments

Comments
 (0)