Skip to content

Fix markdown code block rendering: YAML colorization, pre-wrap, hljs class - #2359

Merged
pelikhan merged 1 commit into
mainfrom
copilot/ensure-markdown-code-regions
Jul 30, 2026
Merged

Fix markdown code block rendering: YAML colorization, pre-wrap, hljs class#2359
pelikhan merged 1 commit into
mainfrom
copilot/ensure-markdown-code-regions

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Markdown fenced code blocks (```markdown) in the workshop SPA were rendered without syntax colorization and without line wrapping. Workshop markdown files are YAML frontmatter + prose, so YAML highlighting is the right fit.

Changes

  • scripts/lib/marked-setup.js

    • Remap markdown/mdyaml in the highlight() callback so hljs colorizes frontmatter keys, values, and comments
    • Update <code> class from language-markdown to hljs language-yaml so hljs token styles apply
  • scripts/lib/docs.css

    • Add white-space: pre-wrap to .markdown-body .markdown-editor-pre so long lines wrap instead of only scrolling

The ◇ icon in the editor bar was already correct.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Use YAML highlighting and pre-wrap for markdown code blocks Fix markdown code block rendering: YAML colorization, pre-wrap, hljs class Jul 30, 2026
Copilot AI requested a review from pelikhan July 30, 2026 11:04
@pelikhan
pelikhan marked this pull request as ready for review July 30, 2026 11:07
@pelikhan
pelikhan merged commit ee690c1 into main Jul 30, 2026
11 checks passed
@pelikhan
pelikhan deleted the copilot/ensure-markdown-code-regions branch July 30, 2026 11:07
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.

2 participants