Browse Source

Fix markdown rendering for linebreaks

Saoud Rizwan 1 year ago
parent
commit
d6c5a237df
3 changed files with 16 additions and 4 deletions
  1. 2 2
      package-lock.json
  2. 1 1
      package.json
  3. 13 1
      webview-ui/src/components/ChatRow.tsx

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "claude-dev",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "claude-dev",
-      "version": "1.0.1",
+      "version": "1.0.2",
       "license": "MIT",
       "dependencies": {
         "@anthropic-ai/sdk": "^0.24.3",

+ 1 - 1
package.json

@@ -2,7 +2,7 @@
   "name": "claude-dev",
   "displayName": "Claude Dev",
   "description": "Autonomous software engineer right in your IDE, capable of reading/writing files, executing commands, and more with your permission every step of the way.",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "icon": "icon.png",
   "engines": {
     "vscode": "^1.84.0"

+ 13 - 1
webview-ui/src/components/ChatRow.tsx

@@ -105,7 +105,19 @@ const ChatRow: React.FC<ChatRowProps> = ({
 				components={{
 					p(props) {
 						const { style, ...rest } = props
-						return <p style={{ ...style, margin: 0, marginTop: 0, marginBottom: 0 }} {...rest} />
+						return (
+							<p
+								style={{
+									...style,
+									margin: 0,
+									marginTop: 0,
+									marginBottom: 0,
+									whiteSpace: "pre-wrap",
+									wordBreak: "break-word",
+								}}
+								{...rest}
+							/>
+						)
 					},
 					ol(props) {
 						const { style, ...rest } = props