Cleaner HTML to Markdown by Default
HTML to Markdown now removes the markup of tags that Markdown has no form for and keeps only their text. Buttons, SVG icons and similar page elements no longer end up in the Markdown as raw HTML, which makes the output cleaner for LLM and RAG use.
Highlights
UnsupportedTagsnow defaults toBypass. A<button>Copy</button>becomes the plain textCopy, and an SVG icon with no text is left out.- Tags listed in
PassThroughTagsare still copied to the Markdown as HTML, whateverUnsupportedTagsis set to. - To keep the previous output, set
UnsupportedTagstoPassThrough.
Parameters
UnsupportedTags(collection, defaultBypass) - how tags Markdown has no form for are handled.Bypasskeeps their text,PassThroughcopies them as HTML,Dropremoves them with their text, andFailstops the conversion with an error.
Try it out
- HTML to Markdown
- API sandbox: html-to-md