diff --git a/src/components/Markdown.svelte b/src/components/Markdown.svelte index 826950184..ea8d99c26 100644 --- a/src/components/Markdown.svelte +++ b/src/components/Markdown.svelte @@ -187,7 +187,7 @@ margin-bottom: 0.625rem; } - .markdown :global(p:last-child) { + .markdown :global(p:only-child) { margin-bottom: 0; } @@ -282,7 +282,7 @@ margin: 1rem 0; } /* Allows the parent to specify its own bottom margin */ - .markdown :global(:last-child) { + .markdown :global(> :last-child) { margin-bottom: 0; } .markdown :global(li > ul) { diff --git a/src/lib/markdown.ts b/src/lib/markdown.ts index 4c2b225dd..93586492e 100644 --- a/src/lib/markdown.ts +++ b/src/lib/markdown.ts @@ -132,17 +132,6 @@ export const renderer = { return `${text}`; }, - listitem(text: string) { - const hasLineBreaks = text.trim().indexOf("\n"); - if (hasLineBreaks === -1) { - return `
  • ${text}
  • `; - } - const [first, ...remaining] = text.trim().split("\n"); - const liContent = `${first}
    ${remaining.join( - "\n", - )}
    `; - return `
  • ${liContent}
  • `; - }, link(href: string, _title: string, text: string) { // Adding the file-link class to relative file names, // so we're able to navigate to the file in the editor.