From 756c750bce72d696b954308b42404c651c10cd55 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 1 Mar 2023 23:02:24 +0200 Subject: [PATCH] change markdown preview to reflect poll changes --- files/assets/js/markdown.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index f88cc7d93..12d168944 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -77,8 +77,7 @@ function markdown(t) { for(i = 0; i < options.length; i++){ const option = options[i][0]; const option2 = option.replace(/\$\$/g, '').replace(/\n/g, '') - input = input.replace(option, ''); - input += `
`; + input = input.replace(option, `
`); } } @@ -87,13 +86,11 @@ function markdown(t) { for(i = 0; i < options.length; i++){ const option = options[i][0]; const option2 = option.replace(/&&/g, '').replace(/\n/g, '') - input = input.replace(option, ''); - input += `
`; + input = input.replace(option, `
`); } } input = marked(input) - input = input.replace(/\n\n/g, '
') const preview = document.getElementById(t.dataset.preview)