New features
--html-to-markdown=<file>(-htm) — convert a local HTML file to clean Markdown without crawling. Outputs to stdout (pipe-friendly) or to a file with--html-to-markdown-output=<file>. Uses the same conversion pipeline as--markdown-export-dirincluding all cleanup, accordion collapsing, code language detection, and implicit exclusions. Respects--markdown-disable-images,--markdown-disable-files,--markdown-exclude-selector, and--markdown-move-content-before-h1-to-end
Markdown export improvements
- Elements with
aria-hidden="true"are now excluded from markdown output — eliminates mega-menu panels and other hidden UI elements (up to 60% noise reduction on some sites) - Elements with
role="menu"(dropdown/popup menus) are now excluded from markdown output - Adjacent block elements (
<div>,<section>,<article>, etc.) now produce newline separation — prevents text from concatenating like "text1text2" - Icon-only links (SVG, images) now use
aria-labelas fallback text instead of raw URL — produces[Facebook](...)instead of[https://www.facebook.com/...](...)for social media links - Common cookie consent banners are now implicitly excluded (CookieBot, OneTrust,
.cookie-banner,.cookie-consent, etc.)
Bug fixes
- Fixed
--markdown-move-content-before-h1-to-endstripping#heading markers —trim_matcheswas removing markdown-significant characters from the start of the document - Fixed
--markdown-disable-filesremoving.htmland.htmpage links — these are navigation links, not downloadable files - Fixed
--markdown-disable-filesremovingtel:andmailto:contact links - Fixed empty list items (
-) remaining after image and file removal - Fixed orphaned links with filename-as-text (e.g.
[some-page.html](some-page.md)) appearing in markdown when media content (video, etc.) was stripped from a link - Fixed empty table rows (
| | |) remaining after content removal - Fixed leading whitespace in link text after image removal (
[ text](url)→[text](url))
Testing
- Added 34 new unit tests covering all markdown export improvements
- Added 10 new integration tests for the
--html-to-markdownmode