diff --git a/web/src/lib/components/editor/Editor.svelte b/web/src/lib/components/editor/Editor.svelte index b391664..0e6eef9 100644 --- a/web/src/lib/components/editor/Editor.svelte +++ b/web/src/lib/components/editor/Editor.svelte @@ -116,7 +116,17 @@ export function getHtml(): Promise { return new Promise((resolve, _) => { editor.update(() => { - resolve(generateHtmlFromNodes(editor)); + let html = generateHtmlFromNodes(editor); + const emptyLineMarkups = [ + '


', + '


', + '


', + ]; + let toTrim: string | undefined; + while (toTrim = emptyLineMarkups.find(x => html.endsWith(x))) { + html = html.slice(0, -toTrim.length); + } + resolve(html); }); }); } diff --git a/web/src/routes/(main)/projects/[user]/[slug]/+page.svelte b/web/src/routes/(main)/projects/[user]/[slug]/+page.svelte index 82efaee..33845a4 100644 --- a/web/src/routes/(main)/projects/[user]/[slug]/+page.svelte +++ b/web/src/routes/(main)/projects/[user]/[slug]/+page.svelte @@ -206,8 +206,6 @@ toast.info("Created ticket successfully."); if (data.project.allTicketsCount !== undefined && data.project.openTicketsCount !== undefined) { - //data.project.allTicketsCount++; - //data.project.openTicketsCount++; refreshFilterMap(); } }