Hwaro::Services::Importers::HtmlToMarkdown
Lightweight HTML-to-Markdown converter. Handles common HTML elements produced by WordPress and other CMS exports.
Constants
MAX_REGEX_HTML_BYTES = (4 * 1024) * 1024
Above this size the regex pipeline's lazy quantifiers (e.g. the anchor
body (.*?)</a>) degrade to O(n^2) on adversarial markup (many
unclosed tags). Imported exports are untrusted, so fall back to a
cheap linear tag-strip rather than spend minutes of CPU on a single
crafted item. The threshold is far above any real blog post.
Class methods
convert(html : String) : String
Source