Browse Source

Revert "Merge pull request #154 from RooVetGit/fix_markdown_wrapping"

This reverts commit 7a4fdebe05a1d754ca15c41a9a8209b37ea6a69c, reversing
changes made to 011113dbab9f6300187501a3b76da159a46b4511.
Matt Rubens 1 year ago
parent
commit
e2ebeaa603
1 changed files with 7 additions and 19 deletions
  1. 7 19
      webview-ui/src/components/common/MarkdownBlock.tsx

+ 7 - 19
webview-ui/src/components/common/MarkdownBlock.tsx

@@ -54,21 +54,14 @@ const StyledMarkdown = styled.div`
 	pre {
 		background-color: ${CODE_BLOCK_BG_COLOR};
 		border-radius: 3px;
-		margin: 13px 0;
-		padding: 10px;
-		max-width: 100%;
-		white-space: pre-wrap;
-		word-break: break-word;
-		overflow-wrap: break-word;
+		margin: 13x 0;
+		padding: 10px 10px;
+		max-width: calc(100vw - 20px);
+		overflow-x: auto;
+		overflow-y: hidden;
 	}
 
 	pre > code {
-		white-space: pre-wrap;
-		word-break: break-word;
-		overflow-wrap: break-word;
-		width: 100%;
-		display: inline-block;
-
 		.hljs-deletion {
 			background-color: var(--vscode-diffEditor-removedTextBackground);
 			display: inline-block;
@@ -85,9 +78,7 @@ const StyledMarkdown = styled.div`
 		span.line:empty {
 			display: none;
 		}
-		white-space: pre-wrap;
-		word-break: break-word;
-		overflow-wrap: break-word;
+		word-wrap: break-word;
 		border-radius: 3px;
 		background-color: ${CODE_BLOCK_BG_COLOR};
 		font-size: var(--vscode-editor-font-size, var(--vscode-font-size, 12px));
@@ -125,10 +116,7 @@ const StyledMarkdown = styled.div`
 	li,
 	ol,
 	ul {
-		line-height: 1.4;
-		white-space: pre-wrap;
-		word-break: break-word;
-		overflow-wrap: break-word;
+		line-height: 1.25;
 	}
 
 	ol,