fix: fix multline breaks in post body, add slugs to urls

This commit is contained in:
MTG2000
2022-06-15 21:05:52 +03:00
parent cc566df768
commit 6cfaa8e354
13 changed files with 109 additions and 13 deletions

View File

@@ -19,7 +19,8 @@ export default function SaveModule(props: Props) {
const changeCallback = useDebouncedCallback(ctx => {
const { state } = ctx;
const md = getMarkdown(state);
let md = getMarkdown(state);
md = md.replace(/\n(?=\n)/g, "\n\n<br/>\n");
onChange(md);
}, [], 500)