From 4adc229b1e684548ef8181dc1b488c783b50ad23 Mon Sep 17 00:00:00 2001 From: nodemixaholic Date: Sun, 31 Mar 2024 21:42:50 +0000 Subject: [PATCH] Update 'frontend.js' --- frontend.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/frontend.js b/frontend.js index 6748017..8f9a2e1 100644 --- a/frontend.js +++ b/frontend.js @@ -15,14 +15,7 @@ function markdownToHTML(markdown) { markdown = markdown.replace(/\*(.*)\*/gim, '$1'); // Replace unordered list items with HTML list tags - markdown = markdown.replace(/^\s*-\s(.*)$/gim, '
  • $1
  • '); - markdown = markdown.replace(/<\/li>\n
  • /gim, '
  • '); - markdown = ''; - - // Replace ordered list items with HTML list tags - markdown = markdown.replace(/^\s*\d+\.\s(.*)$/gim, '
  • $1
  • '); - markdown = markdown.replace(/<\/li>\n
  • /gim, '
  • '); - markdown = '
      ' + markdown + '
    '; + markdown = markdown.replace(/\* (.*?)(\n|$)/gim, '
  • $1
  • '); // Replace inline code with HTML tag markdown = markdown.replace(/`(.*?)`/gim, '$1');