1 Commits

Author SHA1 Message Date
dgrissen2 4c87a8db83 fix: unreadable text in markdown code blocks (light mode) (#234)
* fix: unreadable text in markdown code blocks (light mode)

highlight.js's markdown grammar tokenizes underscores, asterisks, and
backticks as emphasis/strong/code spans. The github-dark theme assigns
these tokens colors (#c9d1d9, #8b949e) that are nearly invisible against
light backgrounds, making large sections of markdown code blocks appear
"washed out."

The existing light-mode overrides in index.css cover keywords, strings,
comments, and numbers — but not .hljs-emphasis, .hljs-strong, or
.hljs-code. This patch forces those three token types to inherit the
base code color, which is already correctly overridden for light mode.

Tokens fixed:
- .hljs-emphasis: underscores in variable names (e.g. data_quality_good)
  were parsed as italic emphasis — now inherits color, removes italic
- .hljs-strong: **bold** markers used #c9d1d9 — now inherits color
- .hljs-code: `backtick` inline code markers used #8b949e — now inherits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add markdown file that reproduces light-mode highlighting bug

Contains a ```markdown code block with underscores in variable names,
**bold** markers, and `backtick` code — all patterns that trigger the
washed-out text rendering this PR fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 07:06:46 -08:00