From 228d8e8e47e913fc6487a917d43a59070aefa0ab Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 31 Jan 2022 10:07:38 +0100 Subject: Convert markdown to html/plain text for feeds --- server/helpers/markdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/markdown.ts b/server/helpers/markdown.ts index ebf479b98..0b8c2fabc 100644 --- a/server/helpers/markdown.ts +++ b/server/helpers/markdown.ts @@ -10,7 +10,7 @@ const markdownIt = new MarkdownItClass('default', { linkify: true, breaks: true, markdownIt.enable(TEXT_WITH_HTML_RULES) markdownIt.use(markdownItEmoji) -const toSafeHtml = text => { +const toSafeHtml = (text: string) => { if (!text) return '' // Restore line feed @@ -23,7 +23,7 @@ const toSafeHtml = text => { return sanitizeHtml(html, sanitizeOptions) } -const mdToPlainText = text => { +const mdToPlainText = (text: string) => { if (!text) return '' // Convert possible markdown (emojis, emphasis and lists) to html -- cgit v1.2.3