Skip to content

Commit 65f41c0

Browse files
Vigilansjdneo
authored andcommitted
fix: #307 (#308)
1 parent e920316 commit 65f41c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webview/leetCodePreviewProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class LeetCodePreviewProvider extends LeetCodeWebview {
163163
difficulty: difficulty.slice(2),
164164
likes: likes.split(": ")[1].trim(),
165165
dislikes: dislikes.split(": ")[1].trim(),
166-
body: body.join("\n").replace(/<pre>\s*([^]+?)\s*<\/pre>/g, "<pre><code>$1</code></pre>"),
166+
body: body.join("\n").replace(/<pre>[\r\n]*([^]+?)[\r\n]*<\/pre>/g, "<pre><code>$1</code></pre>"),
167167
};
168168
}
169169
}

0 commit comments

Comments
 (0)