Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix wrongly wrapping code blocks, breaking line numbers (#7507)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jan 11, 2022
1 parent 8125793 commit f887196
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,17 @@ $left-gutter: 64px;
background-color: $codeblock-background-color;
}

pre code > * {
display: inline;
// this selector wrongly applies to code blocks too but we will unset it in the next one
code {
white-space: pre-wrap; // don't collapse spaces in inline code blocks
}

pre code {
white-space: pre; // we want code blocks to be scrollable and not wrap

> * {
display: inline;
}
}

pre {
Expand All @@ -498,10 +507,6 @@ $left-gutter: 64px;
background: transparent;
}
}

code {
white-space: pre-wrap; // don't collapse spaces in inline code blocks
}
}

.mx_EventTile_lineNumbers {
Expand Down

0 comments on commit f887196

Please sign in to comment.