How this tool computes its result
Both directions are implemented with sequential regex replacements, not a spec-compliant parser. `markdownToHtml` replaces headers, bold, italic, links, images, fenced code blocks, and inline code, converts list-item lines to `<li>`, then groups consecutive `<li>` runs into `<ul>` or `<ol>` (deciding ordered vs. unordered by checking whether the original markdown line for the first `<li>` text started with a digit), and wraps any remaining bare lines into `<p>` tags based on blank-line boundaries. `htmlToMarkdown` reverses each of those regexes independently (headers, strong/b, em/i, a, img, pre/code, code, li, blockquote, hr, p) and finally strips any tags that weren't matched by a specific rule.
