From de5e91cb718c6120a3ed7e65ff9f1ede548f46ea Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 29 Jun 2021 13:07:10 -0400 Subject: [PATCH] Fix trailing backslash on lists in Classic editor Previously, when editing a post with an unordered list in it via the Classic editor, backslashes (\) would get added to the end of each list item. This fixes that. Closes #480 --- prose/prose.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/prose/prose.js b/prose/prose.js index 3096c9e..ae8b3ce 100644 --- a/prose/prose.js +++ b/prose/prose.js @@ -40,13 +40,7 @@ class ProseMirrorView { $title.value = title; } - const doc = writeFreelyMarkdownParser.parse( - // Replace all "solo" \n's with \\\n for correct markdown parsing - // Can't use lookahead or lookbehind because it's not supported on Safari - content.replace(/([^]{0,1})(\n)([^]{0,1})/g, (match, p1, p2, p3) => { - return p1 !== "\n" && p3 !== "\n" ? p1 + "\\\n" + p3 : match; - }) - ); + const doc = writeFreelyMarkdownParser.parse(content) this.view = new EditorView(target, { state: EditorState.create({