Skip to content

Commit e2ebeaa

Browse files
committed
Revert "Merge pull request #154 from RooVetGit/fix_markdown_wrapping"
This reverts commit 7a4fdeb, reversing changes made to 011113d.
1 parent eaa5f7b commit e2ebeaa

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

webview-ui/src/components/common/MarkdownBlock.tsx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,14 @@ const StyledMarkdown = styled.div`
5454
pre {
5555
background-color: ${CODE_BLOCK_BG_COLOR};
5656
border-radius: 3px;
57-
margin: 13px 0;
58-
padding: 10px;
59-
max-width: 100%;
60-
white-space: pre-wrap;
61-
word-break: break-word;
62-
overflow-wrap: break-word;
57+
margin: 13x 0;
58+
padding: 10px 10px;
59+
max-width: calc(100vw - 20px);
60+
overflow-x: auto;
61+
overflow-y: hidden;
6362
}
6463
6564
pre > code {
66-
white-space: pre-wrap;
67-
word-break: break-word;
68-
overflow-wrap: break-word;
69-
width: 100%;
70-
display: inline-block;
71-
7265
.hljs-deletion {
7366
background-color: var(--vscode-diffEditor-removedTextBackground);
7467
display: inline-block;
@@ -85,9 +78,7 @@ const StyledMarkdown = styled.div`
8578
span.line:empty {
8679
display: none;
8780
}
88-
white-space: pre-wrap;
89-
word-break: break-word;
90-
overflow-wrap: break-word;
81+
word-wrap: break-word;
9182
border-radius: 3px;
9283
background-color: ${CODE_BLOCK_BG_COLOR};
9384
font-size: var(--vscode-editor-font-size, var(--vscode-font-size, 12px));
@@ -125,10 +116,7 @@ const StyledMarkdown = styled.div`
125116
li,
126117
ol,
127118
ul {
128-
line-height: 1.4;
129-
white-space: pre-wrap;
130-
word-break: break-word;
131-
overflow-wrap: break-word;
119+
line-height: 1.25;
132120
}
133121
134122
ol,

0 commit comments

Comments
 (0)