Skip to content

Commit fc16ff3

Browse files
hip3ryanthomasdev
andauthored
fix(markdown): extra whitespace before and after pasted content #7364 (#7440)
* fix(markdown): extra whitespace before and after pasted content #7364 * fix(markdown): better solution for extra whitespace before and after pasted content #7364 --------- Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent df3f3b3 commit fc16ff3

File tree

1 file changed

+1
-1
lines changed
  • packages/decap-cms-widget-markdown/src/MarkdownControl/plugins/html

1 file changed

+1
-1
lines changed

packages/decap-cms-widget-markdown/src/MarkdownControl/plugins/html/withHtml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const INLINE_STYLES = {
3737

3838
function deserialize(el) {
3939
if (el.nodeType === 3) {
40-
return el.textContent;
40+
return el.textContent.replace(/(\r)?\n/g, '');
4141
} else if (el.nodeType !== 1) {
4242
return null;
4343
} else if (el.nodeName === 'BR') {

0 commit comments

Comments
 (0)