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');