 const chunks = params.text.split('```');

      for (let i = 0; i < chunks.length; i++) {
        if (i % 2 === 0) { // outside code block
          chunks[i] = chunks[i]
          .replace(/&/g, '&amp;')
          .replace(/</g, '&lt;')
          .replace(/>/g, '&gt;')
          .replace(/(^|\n)#{1,6} ([^\n]*)(?=([^`]*`[^`]*`)*[^`]*$)/g, '$1<h3>$2</h3>')
          .replace(/\*\*(.*?)\*\*(?=([^`]*`[^`]*`)*[^`]*$)/g, '<strong>$1</strong>')
          .replace(/__(.*?)__(?=([^`]*`[^`]*`)*[^`]*$)/g, 