Skip to content

fix: use monospace font in Markdown previews - #694

Closed
Radiummm wants to merge 1 commit into
agegr:mainfrom
Radiummm:fix/markdown-preview-monospace
Closed

fix: use monospace font in Markdown previews#694
Radiummm wants to merge 1 commit into
agegr:mainfrom
Radiummm:fix/markdown-preview-monospace

Conversation

@Radiummm

@Radiummm Radiummm commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use the existing monospace font stack in rendered Markdown file previews
  • keep the change scoped to the file viewer so chat typography is unchanged
  • add regression coverage for the preview style

Tests

  • npm test (845 passed)
  • node_modules/.bin/tsc --noEmit
  • npm run lint

Closes #638

agegr commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Plain-text code blocks in Markdown file previews already use the existing --font-mono stack on main, including fences without a language and those marked text or plaintext (CodeBlock). ASCII diagrams should be placed in code blocks so their spacing and line breaks are preserved.

This PR changes the font of the entire preview, including ordinary headings and prose. We prefer to keep proportional fonts for that content, so we are closing this PR. Changing the body font also does not address whitespace collapsing outside code blocks. A minimal Markdown example reproducing #638 inside a code block would help us identify and fix the underlying rendering issue.

@agegr agegr closed this Sep 5, 2026
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.

Markdown Viewer should use monospace font

2 participants