Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [IOCOM-2040] Handling of code and pre html blocks in old markdown #6652

Merged
merged 14 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ts/components/ui/Markdown/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,26 @@ body {
hyphens: auto;
}

/* Code blocks either overflow horizontally or cause
* the webview height to be reported with a wrong
* value. This styling forces code blocks to render as
* standard paragraphs, resolving both problems. A
* 'pre' tag normally includes a 'code' block inside */
pre {
font-family: 'Titillium SansPro';
margin-block-start: 0;
white-space: pre-wrap;
}

/* This block is normally contained into a 'pre' block.
* The custom styling on the 'pre' block forces it to
* render as a standard paragraph but the 'code' block
* needs to customise the 'font-family', otherwise the
* text appearance will be 'monospace' */
code {
font-family: 'Titillium SansPro';
}

h1, h2, h3, h4, h5, h6 {
line-height: 1.3333em;
}
Expand Down
Loading