Skip to content

Commit 48f200f

Browse files
authored
fix: prevent overflow by adding line breaks in table codes (#485)
Horizontal overflow occurs when a code block in markdown table is too long. This is prevented by adding line breaks (`break-all`) in codes inside table.
1 parent 0d8cbaf commit 48f200f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/styles/typography.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@
2929
pre:has(code) {
3030
@apply border border-border;
3131
}
32-
code,
33-
blockquote {
34-
word-wrap: break-word;
32+
33+
.prose code,
34+
.prose blockquote {
35+
@apply break-words;
36+
}
37+
38+
.prose table code {
39+
/* add line breaks whenever necessary for codes under table */
40+
@apply break-all;
3541
}
3642

3743
pre > code {

0 commit comments

Comments
 (0)