Merge pull request #484 from writefreely/fix-classic-backslashes

Fix trailing backslash on lists in Classic editor
pull/485/head
Matt Baer 3 years ago committed by GitHub
commit 577bdf14aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      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({

Loading…
Cancel
Save