Skip to content

Commit

Permalink
UpdateMarkdown
Browse files Browse the repository at this point in the history
  • Loading branch information
danielunited committed May 24, 2023
1 parent 996013c commit 5c63447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/LocalEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class LocalEditor extends React.Component {
}

updateMarkdown() {
let markdown = this.state.note.content.text.split("\n").join("\\n");
let markdown = this.state.note.content.text.replace(/(\n{2})(\n+)(?!:::)(?!---)/g, (m, p, q) => p + q.replace(/(\n)/g, "\\$1"));

if (markdown === "") {
markdown = "\n";
Expand Down

1 comment on commit 5c63447

@vercel
Copy link

@vercel vercel bot commented on 5c63447 May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.