From 7dae61453564bdca2d9e54a45eaad6610f95d6bf Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Tue, 14 Sep 2021 14:48:22 +0530 Subject: [PATCH] Add extra options to markdown converter Now, bare URLs are auto-converted, links are opened in a new window, the ~~strikethrough~~ format also works, and last but not the least, ChipChoc is now emoji-enabled! --- src/App.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index 2d08e2f..be54129 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -2,7 +2,14 @@ import Importabular from "importabular" import showdown from "showdown" - let converter = new showdown.Converter() + let converter = new showdown.Converter({ + simplifiedAutoLink: true, // automatically convert links... + excludeTrailingPunctuationFromURLs: true, // ...but not the trailing punctuation + openLinksInNewWindow: true, // don't forget to open in new window! + simpleLineBreaks: true, // use two line breaks to start a new paragraph + emoji: true, // because why not 😉 + strikethrough: true, // ~~that also~~ + }) let editor