Skip to content

Commit

Permalink
Revert "fix: rendering is different between preview and wysiwyg (fix: n…
Browse files Browse the repository at this point in the history
…hn#528)"

This reverts commit 451cc17.
  • Loading branch information
kishorethecoder committed Dec 4, 2019
1 parent 41fafa0 commit 607b254
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/codeMirrorExt.js
Expand Up @@ -122,7 +122,7 @@ class CodeMirrorExt {
* @returns {string} - codeMirror text value
*/
getValue() {
return this.cm.getValue('\n').replace(/<br>\n/g, '<br>');
return this.cm.getValue('\n');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/js/mdPreview.js
Expand Up @@ -35,7 +35,7 @@ class MarkdownPreview extends Preview {
latestMarkdownValue = markdownEditor.getValue();

if (this.isVisible()) {
this.lazyRunner.run('refresh', latestMarkdownValue);
this.lazyRunner.run('refresh', latestMarkdownValue.replace(/<br>\n/g, '<br>'));
}
});

Expand Down

0 comments on commit 607b254

Please sign in to comment.