Skip to content

Commit b35953d

Browse files
committed
fix md viewer line breaks when copying
-set white-space to normal to remove extra space between lines
1 parent 941c4ae commit b35953d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

browser/components/MarkdownPreview.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ h2 {
7373
padding-bottom: 0.2em;
7474
margin: 1em 0 0.37em;
7575
}
76+
77+
body p {
78+
white-space: normal;
79+
}
7680
`
7781
}
7882

browser/lib/markdown.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var md = markdownit({
1919
linkify: true,
2020
html: true,
2121
xhtmlOut: true,
22+
breaks: true,
2223
highlight: function (str, lang) {
2324
if (lang === 'flowchart') {
2425
return `<pre class="flowchart">${str}</pre>`

0 commit comments

Comments
 (0)