diff options
Diffstat (limited to 'server/helpers/markdown.ts')
-rw-r--r-- | server/helpers/markdown.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/markdown.ts b/server/helpers/markdown.ts index 25685ec6d..41c1186ec 100644 --- a/server/helpers/markdown.ts +++ b/server/helpers/markdown.ts | |||
@@ -8,7 +8,7 @@ const markdownItEmoji = require('markdown-it-emoji/light') | |||
8 | const MarkdownItClass = require('markdown-it') | 8 | const MarkdownItClass = require('markdown-it') |
9 | 9 | ||
10 | const markdownItWithHTML = new MarkdownItClass('default', { linkify: true, breaks: true, html: true }) | 10 | const markdownItWithHTML = new MarkdownItClass('default', { linkify: true, breaks: true, html: true }) |
11 | const markdownItWithoutHTML = new MarkdownItClass('default', { linkify: true, breaks: true, html: false }) | 11 | const markdownItWithoutHTML = new MarkdownItClass('default', { linkify: false, breaks: true, html: false }) |
12 | 12 | ||
13 | const toSafeHtml = (text: string) => { | 13 | const toSafeHtml = (text: string) => { |
14 | if (!text) return '' | 14 | if (!text) return '' |
@@ -66,7 +66,7 @@ function plainTextPlugin (markdownIt: any) { | |||
66 | 66 | ||
67 | if (token.type === 'list_item_close') { | 67 | if (token.type === 'list_item_close') { |
68 | lastSeparator = ', ' | 68 | lastSeparator = ', ' |
69 | } else if (/[a-zA-Z]+_close/.test(token.type)) { | 69 | } else if (token.type.endsWith('_close')) { |
70 | lastSeparator = ' ' | 70 | lastSeparator = ' ' |
71 | } else if (token.content) { | 71 | } else if (token.content) { |
72 | text += lastSeparator | 72 | text += lastSeparator |