Skip to content

Changelog

All notable changes to html-to-markdown will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • Run Python visitor callbacks supplied through conversion options (#976).
  • Render nested tables in layout cells as separate Markdown blocks (#975).
  • Preserve Markdown heading syntax inside inline formatting and fix Node visitor preprocessing and navigation (#977).
  • Build with Rust 1.100.0 and update Cargo dependencies.
  • The CLI also installs as h2m, a short alias of html-to-markdown; shell completions generated through h2m complete h2m. Every channel ships it: cargo install, cargo-binstall archives, the Homebrew tap and Scoop.
  • Python’s convert and convert_with_accessible_names release the GIL while converting again, so other Python threads keep running during a large conversion; a visitor reacquires the GIL only for its callbacks. The GIL had been held for the whole call since 3.2.0. Regenerated with Alef 0.127.3 (#974).
  • macOS 15 is the minimum for every macOS artifact (3.21.0 required macOS 26): wheels, the CLI, the native bindings and the Swift package all target macOS 15, the oldest release Apple still supports.
  • Breaking for macOS 25 and earlier: macOS 11 to 25 are no longer supported; macOS 26 is the minimum. Every macOS binary, the CLI included, is built for macOS 26, the minimum the Swift package already declares. Python wheels targeted macOS 10.12 before, and the CLI and the other macOS natives used the Rust default.
  • Regenerate the bindings with Alef 0.124.1. NodeContext gains an attributes field or property in Node, Go, R, Dart and PHP (the PHP constructor takes it as an optional trailing parameter). Breaking: Swift’s attributes() method becomes an attributes property.
  • NodeContext.attributes() returns the element’s attributes in every binding, visitor callbacks included, instead of an empty map (#969).
  • The core vX.Y.Z tag of a Swift release holds the final Package.swift checksum before anything publishes. A release now takes two steps: dispatch Prepare Swift release on main, which builds the bundle, pins its checksum and creates the tag, then Publish Release on the tag. Publish Release verifies the bundle with xberg-io/actions/publish-swift-release and never moves a tag or the release/swift/<version> branch (#963).
  • The Rust core now parses HTML with astral-html in place of astral-tl.
  • Breaking: build_document_structure takes a DOM from html_to_markdown_rs::dom::parse in place of a tl::VDom. The dom module is the public parser API: it replaces the types of tl that the function took before.
  • A tag name that runs into the next < and a stray quote in a tag now follow the HTML tokenizer: <b<i>t</i> gives t, not bold text. Attributes of a preserved tag keep their source order, and a slash splits an attribute name.
  • Minimum supported versions raised: Node.js 22, Ruby 3.3, PHP 8.3, Elixir 1.17, Android API 24, macOS 26, Rust 1.99.
  • Python 3.11 is now the minimum supported version; Python 3.10 reached end of life.
  • Regenerate the bindings with Alef 0.123.0. The Zig package now requires Zig 0.17.
  • Python option enums subclass StrEnum.
  • Python visitors can read HTML attributes with NodeContext.attributes() during a callback. The binding only materializes the attribute map when requested (#969).
  • Preserve parser source ranges after skipped empty end tags.
  • Verify prepared Swift artifacts before creating and publishing an immutable release (#963).
  • A tag name that holds a dot or other punctuation now closes at its end tag, so later links no longer nest inside the link before it (#965).
  • Keep heading metadata as plain text from the same conversion pass, preserving literal markup, admitted image labels and visitor decisions.
  • Fully remove visitor-skipped children after exclusions trim whitespace, including UTF-8 text and nested table buffers.
  • An end tag with white space before its > closes its element without a rewrite of the page, so text in comments and attribute values keeps its bytes (#965).
  • Self-closing markup in text the author wrote, such as <br/> in a textarea, an xmp or escaped markup, keeps its bytes and gains no space before /> (#965).
  • Tag names are read in lower case, so the exclude_selectors type selector div also removes <DIV>. SVG element names such as clipPath keep their mixed case inside svg (#965).
  • exclude_selectors attribute, id and class selectors match the decoded value, so [title=Abc] removes an element with title="&#65;bc" (#965).
  • An end tag closes its element in any letter case, as HTML reads it, so <div>a</DIV> no longer leaves the div open and the page no longer needs the repair parse (#968).
  • Refresh stale coding-agent plugin provenance that blocked plugin package publication.
  • Render table headers, body rows, and footers in HTML table order regardless of source section order, including plain text and structured table grids (#960).
  • Run repository tasks with mise run <task> instead of go-task; every task name is unchanged. mise.toml and mise.lock now pin the development toolchain, and CI installs it with setup-mise.
  • Upgrade Rust dependencies, including development benchmarks, to current compatible toolchain versions.
  • Move accessible-name policy from ConversionOptions, its builder, and updates to convert_with_accessible_names(html, use_accessible_names, options), restoring the 3.18.6 exhaustive Rust struct shape (#958). Existing convert calls keep the enabled default.
  • Require 3.18.7 field users to migrate Rust, JSON, C, and generated binding calls to the separate boolean argument; remove the corresponding options accessors and document the 3.19.0 migration.
  • Preserve Alef TypeScript declarations when building the native Node package.
  • Set image_index on an image node in the document structure to the entry its extracted bytes take in images, as documented, so a consumer can place an inline data: image where it stands in the document.
  • Add use_accessible_names (default true) to omit link accessibility-name fallbacks and SVG labels while retaining drawn text when disabled (#941).
  • Regenerate language bindings, package scaffolding, documentation, and test suites with Alef 0.114.2.
  • Require released ai-rulez 5.7.0 for local tooling, generated hooks, and CI (#939).
  • Run automatic CI on main while retaining scheduled and manual workflows.
  • Preserve separators around whitespace-only links and inline elements without exposing link destinations (#932, #933).
  • Preserve no-break spaces at nested emphasis boundaries and whitespace before nested list blocks (#934, #935).
  • Separate adjacent links containing block elements and retain boundary breaks in code and labels (#936, #937).
  • Select the presentation branch of MathML semantics without duplicating annotations, and preserve fraction and power structure (#938, #940).
  • Preserve structured native error properties through Node CommonJS and ECMAScript module entry points.
  • Separate the text on either side of a <br> in the document structure, with a line break in a paragraph or list item and a space in a heading, so Loose words<br>next line is no longer recorded as Loose wordsnext line.
  • Record text outside a paragraph, heading or list item in the document structure, such as the text of <div>Words</div> or the text after a list or a table, so a consumer of the structure no longer loses it.
  • Update ctutils to 0.4.6 to address RUSTSEC-2026-0385 and refresh Rust dependency locks.
  • Refresh PHP consumer-test development dependencies to remove Guzzle and PSR-7 security advisories.
  • Preserve whitespace inside formatted link labels so adjacent words remain separated (#929).
  • Synchronize the Go E2E dependency pin with the workspace release version.
  • Ignore source-layout whitespace between MathML elements so inline formulas stay within their paragraph (#925).
  • Escape literal asterisks inside bold table text to preserve the intended formatting (#926).
  • Omit presentation tables whose cells contain only line breaks (#927).
  • Preserve link destinations inside preformatted blocks (#928).
  • Raise the default conversion depth limit from 64 to 1024 so deeply nested pages retain their text. Explicit lower limits remain supported, and skipped content still produces a depth-limit warning (#924).
  • Avoid stack overflows when searching deeply nested link children for tables (#923).
  • Use smaller GitHub API pages when collecting release-job results to avoid failed summaries on large release workflows.
  • Keep SVG labels and image alt text separate from neighboring words when rendered as text, including inside links, headings and code (#918).
  • Preserve fallback text, nested images and captions inside picture elements (#919).
  • Preserve spaces before inline elements after blank lines in list items and after links (#920).
  • Preserve stray table text, explicit breaks in otherwise empty code elements, text following an unclosed noscript inside noframes, and block boundaries inside subscript and superscript elements. Retain the existing tested policies for metadata-only heads and malformed markup (#921, #922).
  • Upgrade Rust and language-package dependencies, including PyO3 0.30.1, ext-php-rs 0.16.3, Jackson 2.22.4 and Vitest 5.0.5, and regenerate bindings and documentation with Alef 0.111.0.
  • Upgrade the documentation site to Astro 7.4.0 and remove vulnerable transitive dependencies from its Markdown discovery and CSS selector tooling.
  • Preserve Markdown image syntax for images with alt text and no source, restoring the behavior from 3.17.2 (#917).
  • Preserve slashes and literal quotes in unquoted attributes on the fast converter, and use the full converter’s recovery for unclosed script and style tags (#853, #854, #855).
  • Preserve leading blank lines when rebuilding preformatted elements, remove styles without adding spaces inside code blocks, and repair paragraph boundaries beside unusual raw-text tags without discarding authored frameset text (#850, #858, #895).
  • Extract metadata before the body when the head is implicit, ignore commented head tags, retain images that end the head, and separate front matter from bare body text consistently (#847, #848, #849, #856, #866).
  • Let visitors skip retained template and noscript elements with hidden_content: all, while preserving their content, exclusions and table rows for continuing visitors (#907).
  • ConversionOptions::hidden_content chooses whether the output holds the text that a browser does not show at first, so a search index can hold an inactive tab panel or a collapsed answer. drop (the default) writes none of it, as before. reachable keeps the text a reader can get to in the page: an element with the hidden attribute or with inline display: none, visibility: hidden or font-size: 0, an element of an inline <svg> with display="none" or visibility="hidden", and a declarative shadow root (a <template> whose shadowrootmode is open or closed). all also keeps the content of <template> and <noscript>, where it is written, but not in the document head: there the two elements hold metadata, and no choice writes it. No choice writes a <script>, a <style> or a comment as text. The converter reads the inline style attribute only: an element hidden by a style sheet rule or a class name was never dropped and is kept with every choice, and so is aria-hidden content, which a browser shows. The metadata and the document structure follow the markdown. An element that exclude_selectors names is not written under any choice: a kept <template> or <noscript> that a selector matches is removed whole, and a selector removes the same elements under each choice. The CLI takes it as --hidden-content (#753).
  • Coding-agent plugins for Claude Code, Cursor, Codex, Gemini, Kimi, OpenCode, Factory, Hermes, Pi, GitHub Copilot and the agent-plugins format are generated from one source under plugin/, with a marketplace index and a CLI reference that lists every flag.
  • The C FFI release now publishes static C libraries beside the shared libraries.
  • Rust dependencies were upgraded: ext-php-rs 0.16.2, html-escape 0.3.0, schemars 1.2.3 and rustls 0.23.46, which fixes RUSTSEC-2026-0346, RUSTSEC-2026-0347 and RUSTSEC-2026-0348. All generated bindings, documentation, test applications and E2E suites were refreshed with Alef 0.110.12. JavaScript packages moved to pnpm 12.

  • Head-tag lookup skips text bytes and bounds implicit-head searches to the document prefix, and the previous sibling’s tag context is cached, which speeds up conversion of large pages.

  • Strict whitespace no longer turns source line endings into hard breaks when a visitor skips a break subtree or replaces it with only spaces or tabs. This holds for emphasis, strong, generic element, inline-code, link, subscript, superscript, strikethrough, underline, insertion and mark visitors, and for an empty line-break callback or a CSS-excluded break subtree in a blank inline wrapper. A partial link replacement that retains deferred blocks keeps its break behavior, and breaks are retained on later table passes. Normalized Markdown and Djot keep the no-break-space prefix after empty header, figcaption, address, fieldset, center, dialog, hgroup, aside, footer, main and details blocks in list continuations (#868).

  • Markdown, Djot and plain output honor exclude_selectors on table cells, rows, and sections, including layout and nested tables. The document table grid excludes the same selected parts (#730, #896).

  • The text inside a textarea is text: <textarea><b>bold</b></textarea> gave **bold** and now gives <b>bold</b> (#828).

  • The fast converter keeps the text after a </style> end tag with a form feed after the name (#826).

  • A page is not empty when a structured data script has a slash or a form feed after script in its start tag and <script> in its JSON (#825).

  • A script or style start tag with no end tag follows one rule in every spelling on the full converter, the rule of #277: the markup after it is written. A start tag with a form feed after its name, or with an apostrophe in an attribute value with no quotes, was not read: <p>a</p><script data=it's><p>b</p> gave a and now gives a and b.

  • A character reference in a structured data script is kept as written in the metadata: {"a":"&lt;p&gt;"} gave {"a":"<p>"} in raw_json and now gives {"a":"&lt;p&gt;"} (#824).

  • In plain output, white space on the two sides of a structured data script, a template, a comment, a noscript or a math element gives one space with the full converter: <p>foo <script type="application/ld+json">{}</script> bar</p> gave foo bar and now gives foo bar (#827).

  • A script, style or textarea tag inside a bogus comment (<? ... >, <! ... >, </ ... >) starts no element: <p>before</p><?x <script>?><b>Shown</b><?x </script>?><p>after</p> gave before and after and now gives ?>**Shown**?> between them.

  • A page with many script or style start tags with no end tag converts in linear time; the time was quadratic. In a release build 2,000 <script> start tags took 48 ms and now take 1 ms, and 32,000 took 12 s and now take 16 ms.

  • Inline break-only wrappers retain a real break after text inside a div or after a nested no-break space, including through transparent nested strong wrappers and after earlier paragraphs (#863). A leading Backslash break followed only by blank text collapses to the existing separator instead of emitting empty emphasis marks. A quote containing only those artificial marks now matches Spaces style and is omitted; quotes with real text keep their structure. Form-feed-only marked bodies retain the form feed outside the markers, following #811.

  • Inline elements whose body is only a no-break space or another noncollapsible blank character keep that character after an existing space instead of dropping it (#843). Breaks at the end of emphasis use positions from the same output buffer, so preceding text length no longer removes a hard break. With the default newline style, direct break-only emphasis after paragraph text retains its hard break on every route, including in the first paragraph (#863). Code-like elements with block children or leading breaks use the full converter’s tree rules on every route, avoiding different output from the fast scanner (#842).

  • Removed script elements no longer insert a space between adjacent words. Authored whitespace and style-element boundaries retain their existing behavior (#827).

  • Unmarked mark elements with only direct text children no longer count an unused line column. Nested elements still retain live list columns; suffix classification and line searches remain unchanged (#862).

  • A source line ending before retained data-list content becomes a space in Markdown, as before a select list. Without visitor callbacks, empty, input-only or excluded data lists keep the existing source boundary. A no-break space beside retained content stays a no-break space. A source line ending at the end of an option group outside a select or data list also separates the following word. Plain text retains these line endings (#864, #867).

  • Emphasis, variable (var) and definition (dfn) text, strikethrough and Djot inserted text, and mark styles other than None no longer recount the existing line before each element. Unmarked highlighting and other inline wrappers still require line-state work (#862).

  • The testkit-forced fast scanner keeps retained forms transparent in Plain output. With form removal disabled, <div>before<form>name</form>after</div> gives beforenameafter, matching the full converter; paragraphs inside forms keep their own breaks. Public Plain conversion continues to use the full converter.

  • The fast converter leaves form removal to the full converter’s HTML5 tree (#829). With an unclosed label, <p>before<form><label>name<input></form>after<p>next keeps before, after and next as separate paragraphs: source form removal stops at the explicit end tag (#879). Nested forms also use the HTML5 tree: <form>a<form>b</form>c</form>d now keeps cd when removing forms, instead of losing c. Pages whose forms are removed, and retained forms with nested starts, use the full converter; well-formed retained forms can still use the fast converter.

  • Comment and form-feed runs before a line break use cached sibling lookahead instead of rescanning each suffix, retaining the existing output on every conversion route.

  • A line break before inline text in a definition description keeps its joining space after the term’s blank line. Paragraphs in strict-mode headings retain source whitespace without doubling a separator; divs keep their word boundaries, including inside heading code spans. Unicode indentation after a hard break, including U+3000, is retained (#839).

  • Quotes and lists inside a heading write their labels without structural quote or list markers. Literal > and - text stays, and heading quote/list visitor overrides still apply (#859).

  • Audio and video players inside an outer link contribute plain label text instead of a nested Markdown link. Their labels stay separate from adjacent words without padding punctuation or visitor-skipped content, and an outer anchor with an empty address retains each player destination. Fallback content without a player address also stays separate from the next word inside the link. Inside preformatted code their default player output contributes no link or extra blank line; visitor-provided output still applies (#840, #841).

  • A definition description outside a definition list starts a new block instead of joining the preceding word. <div>a<dd>b</dd> c</div> now writes a, b and c as separate blocks; a heading or link keeps its description inline with a word space, and an orphan description after a closed list item keeps its blank line (#838).

  • An indented code block at the start of a definition description inside a list item keeps the item’s content-column indent on its first line as well as later lines, with a blank line before the code. Bullet and numbered items now render the whole block as code (#806).

  • Inserted text (<ins>) is plain text and no longer takes the highlight markers. A rule inside it is on its own line.

  • Teletype text (<tt>) is a code span.

  • A <button> stays in the line of the text around it, with no blank lines before or after (#785).

  • A definition list has a blank line between a term and its description.

  • A CDATA section in HTML content is dropped from the output.

  • A form feed is kept as text and no longer collapses as white space (#811).

  • The link for an <audio>, <video> or <iframe> has the title of the element as its label, or the element name in lower case, in place of the address.

  • White space at the start or the end of the label of an autolink is written beside the autolink, as it is for a link with other text: Press <a href="https://e.org/">https://e.org/ </a>now. gave Press <https://e.org/>now. and now gives Press <https://e.org/> now.. The fast converter writes the text of the full converter at a label edge: Press<a href="/p"> Go</a> now. gave Press[Go](/p) now. on a direct call and now gives Press [Go](/p) now.. A no-break space or another Unicode space at a label edge is the one space of that edge, as it is at the edge of a text.

  • White space at the start or the end of a link label or of a short quotation is written beside the link or the quotation, not inside it, as it is for bold text. Press <a href="/p">Go </a>now. gave Press [Go](/p)now. and now gives Press [Go](/p) now.. Press <q>Go </q>now. gave Press "Go"now. and now gives Press "Go" now.. A link inside a link is written after the outer link with that space: [Outer](/o) [Inner](/i). In a paragraph, a line break at the edge of a link label stays in the label, as before. In a heading or a table cell, where a line break cannot be written, a space now separates the words on the two sides of the link: <h2>Press<a href="/p">Go<br></a>now</h2> gave ## Press[Go](/p)now and now gives ## Press[Go](/p) now. A short quotation that ends with a line break keeps the break: Press <q>Go<br></q>now. gave Press "Go"now. and now gives Press "Go", a line break and now.. A visitor callback at the end of a link or a quotation now receives that edge white space in the text it is given, as for bold text. Skip, Custom and PreserveHtml from the link callback give the same output as before.

  • A checkbox outside a task list item writes nothing. <p>Agree <input type="checkbox"> to the terms</p> gave Agree [ ] to the terms and now gives Agree to the terms. Bracket pairs in running text are link syntax: [x](optional) rendered as a link. A table cell that holds only inputs keeps its task brackets: | [x] |. A label or a span around the checkbox of such a cell does not change that. A list item is a task item only when the checkbox is its first content: <li>Text <input type="checkbox"> more</li> gave - [ ] Text more and now gives - Text more. The menu switch of many themes, a checkbox before its label, no longer writes [ ] (#757).

  • An output, a meter, a progress bar or a text area is a word of its own in running text, also when the source glues it to a word: <p>x<output>half</output>y</p> gave xhalf, a blank line and y, and now gives x half, a blank line and y. The line still ends after the control (#752).

  • A link whose content gives no text is labelled with the name of the link: its aria-label, then its title. Before, the label was the address of the link. This changes the default output for every such link, with or without a graphic: <a href="/page" aria-label="Next page"><i class="fa fa-arrow"></i></a> gave [/page](/page) and gives [Next page](/page). A link with no child node is named too: <a href="/page" aria-label="Next page"></a> gave [](/page) and gives [Next page](/page). A link with no name keeps its address as its label, or its empty label when it has no child node. A link with a name is also kept when inline_data_media = drop_element removes its content.

  • A link into its own page whose content gives no text is left out, whatever that content is (a graphic with no text, an empty element, nothing) and whether or not the link has a name. It is the icon of a heading permalink or of a “back to top” link, and it leads nowhere else: <h2>Title <a href="#title"><svg>...</svg></a></h2> gives ## Title, and <a href="#top" aria-label="Back to top"></a> gave [](#top) and gives nothing. A link is into its own page when its address, after it is resolved, differs from the address of the page (base_url) only by a fragment. A <base> element changes what #part resolves to, so on such a page #part can name another document, and that link is kept. With no base_url, a written #part is into its own page when the document has no <base> element; with one, the link is kept. Such a link that has text is kept with its text.

  • A link whose only content is an inline <svg> with no text is no longer labelled SVG Image. The link is kept and labelled by the first rule above: <a href="/page" aria-label="Next"><div><svg>...</svg></div></a> gives [Next](/page) (#750).

  • A code block keeps the indentation that all its lines share. The converter removed it since the fix for #134: <pre> a = 1\n b = 2\n</pre> wrote the lines "a = 1\n b = 2" and now writes " a = 1\n b = 2", as the page shows it. Blank lines at the end of a block are dropped. In a list item one blank line at the end stayed and is now dropped too: the middle item of <ul><li>a</li><li><pre><code>b\n\n\n</code></pre></li><li>c</li></ul> wrote the fence, b, a blank line and the fence, and now writes the fence, b and the fence. A code block in a table cell is still one code span and does not keep that indentation (#782).

  • A fenced code block keeps a blank first line. A browser drops one line feed after the <pre> tag and shows a second one as a blank line. The converter dropped every line feed at the start of a block: <pre>\n\na\n</pre> wrote the fence and a, and now writes the fence, a blank line and a. An indented code block does not start with a blank line. Strict white space mode writes the start of a block as before.

  • A link, highlighted text and an abbreviation inside a code block write their text and no Markdown marks, because a code block shows every character as text: <pre>Guido &lt;<a href="/mail">guido</a>&gt;</pre> wrote Guido <[guido](/mail)> and now writes Guido <guido>. Highlighted text and an abbreviation inside a code span do the same. A link inside a code span stays a link, with the code marks around its text (#813). An image in a code block or a code span writes its alt text, and an inline <svg> in code writes its text in place of a data: image. The link and the image stay in the metadata (#781).

  • With extract_metadata off, an empty pre writes nothing in place of an empty fence, as with the default options.

  • The documentation of exclude_selectors names the selector forms that match: a tag name, a class, an id, an attribute, *, and these joined with no space. A selector with a combinator (.menu a, div > p, h2 + p) or a pseudo-class matches nothing and reports no error, and the documentation now says so. The conversion is the same as before.

  • A bold element that holds only a line break, after bold text, writes its hard break again in a block that does not start the output and in a link label: <p>x</p><p><b>a</b><b><br></b><b>c</b></p> gave **a** **c** in the second paragraph and gives **a**, a hard break and **c**, as before. The block that starts the output keeps the one space (#502).

  • A bold element after bold text that holds two or more line breaks, or a blank element before its line break, writes its hard break again at every position: <h1>Notes</h1><p><b>Name</b><b><br><br></b>Ada</p> gave **Name** Ada and gives **Name**, a hard break and Ada, as before (#897). Only an element that holds one line break and nothing else is the one space of #502.

  • Collapse no-break-space tails after empty options and empty or line-end-only inline descendants to full-main spacing on every route (#868), retaining literal pre content and strict whitespace.

  • Avoid duplicating a space after line-ending text followed by a span containing only silent void elements (#868); visible nested breaks and images retain their boundaries.

  • Keep the first document base effective when hidden content is dropped before removing a form, matching pages without a removed form.

  • Preserve foreign template/noscript descendants of SVG and MathML graphics when excluding page elements with hidden content kept.

  • Avoid repeated depth ancestry walks during HTML5 repair and unused inline output-column scans (Refs #830, #862). Marker-looking text tails such as x. and x12) also skip unused column scans. Numeric suffixes read only their trailing digit run before proving an adjacent text prefix cannot start a marker; whitespace-separated markers and all-blank tails keep the existing fallback. Growing digit runs still require suffix scanning. Unmarked mark elements with no children or only direct blank text no longer scan a growing prefix for unused inline line state. Comments, nested tags, encoded text and visible form feeds retain their ordinary child context. Topology changes and live marker columns retain their existing limits and behavior. Repair detection reads the parser tree directly, building topology maps only for the selected conversion tree; mandatory HTML5 repair, text guards and parser limits remain in effect.

  • Self-closing raw-text and inert elements encountered in an HTML head contain their following text. Head titles remain metadata; preserved xmp retains one container around its literal body (#878).

  • With form removal enabled, text after an explicit </form> stays outside the removed form even when a child is still open. Forms without an end tag keep the existing subtree removal. Minimal preprocessing, visitor callbacks, possible preserved ancestors and table-contained forms retain their existing behavior (#879).

  • A <label> inside a code block keeps the spaces and the line ends of its text (#822).

  • A paragraph inside a heading keeps a space between its text and the text after it (#804).

  • With convert_as_inline, a term or a description of a definition list has a space between it and the text before it: <dl><dt>t</dt><dd>d</dd></dl> gives t d, was td. The same holds in a heading and in a link.

  • An <audio> or <video> gets its link also when extract_metadata is false and highlight_style is none: <p>x</p><video src="/v.mp4"></video> gives x, then [video](/v.mp4), was x only.

  • Preserved repaired JSON-LD scripts retain their JSON after slash-separated tag names and cannot claim authored bodies through markers joined by bogus-comment removal. Preserved script attributes now serialize in key order on both HTML serialization paths (#875).

  • An unclosed JSON-LD script beginning with a complete JSON value accepted by the JSON parser (including scalars at valid JSON boundaries) keeps the markup after that value and its original JSON bytes for metadata. Invalid or unrecognized JSON uses the existing empty-script fallback (#875).

  • Form controls inside code spans keep legends and buttons as separate words, without emphasis markers or split code spans in table cells (#815).

  • Tables containing only media retain their video, audio, frame links and inline graphics (#817).

  • Indented code blocks inside figures retain their first-line indentation (#819).

  • Paragraphs inside short quotations retain their block boundaries (#820).

  • Unclosed markup inside inert and raw-text elements no longer swallows following content; document titles and legacy preformatted text retain literal tag text. Plain output now omits iframe fallback bodies that were previously included. Tokenization is limited to protected bodies and their namespace context, avoiding a full-page pass for a single inert body. Tag-shaped text in malformed end-tag comments and comments starting with <!--!> or <!---!> no longer swallows following text or changes literal raw-text bodies. In HTML, self-closing syntax on iframe, noscript and template does not close the element: following markup remains inside it until its closing tag, including markup previously retained from XHTML-style input (#821).

  • Links inside code, kbd and samp spans keep their destinations outside the code marks, including links in table cells. Image labels stay literal, and quotes and hidden templates retain their normal behavior (#813).

  • Nested tables in a Markdown cell retain their text without nested table delimiters, with spaces between cells and surrounding content (#760).

  • Stray table rows and cells retain their text (#805). Empty link destinations keep the label as plain text, and empty presentational wrappers follow the same label rule as a bare empty link; named labels and icons retain their fallback names.

  • An image with no source inside pre keeps the space on each side of it. Outside pre, one space remains when the next text starts with a character reference or follows a comment.

  • A stray cell inside a table cell keeps its text.

  • A link that holds only an empty div or an empty i, with no class, gets the empty label, as a link that holds an empty span does.

  • The rule under a table header is as wide as a cell that holds a nested table.

  • An image in code, kbd, samp or pre text is its alt text on the fast path too, as the full converter writes it. The fast path wrote the Markdown image inside the code text.

  • Plain text output separates the text of a form control from the words beside it, as the Markdown output does. This shows for a control outside a form element with the default options, and for a control inside one with remove_forms off. <p>aaa<select><option>Xone</option><option>Xtwo</option></select>bbb</p> gave aaaXoneXtwobbb and now gives aaa Xone Xtwo bbb. Each option of a select list or a data list is a word of its own. A button, an output, a meter, a progress bar or a text area is a word of its own too: <h1>aaa<button>Xone</button><button>Xtwo</button>bbb</h1> gave aaaXoneXtwobbb and now gives aaa Xone Xtwo bbb. A word after the form or fieldset element that holds the control is separated too: <p>aaa<fieldset><button>Xone</button></fieldset>bbb</p> gave aaaXonebbb and now gives aaa Xone bbb. So is a word after a control that holds the end of a block, such as a button with an hr element in it. No space is written before closing punctuation. In a pre element a button adds no space, and the options of a select list stay separate words. With a visitor, an element that is removed or replaced keeps the space after a control before it and leaves no text of its own, and the removal no longer panics inside a multi-byte character (#814).

  • An option element with no select list around it is a word of its own in Markdown output and in plain text output: <p>aaa<option>Xone</option>bbb</p> gave aaa Xonebbb and now gives aaa Xone bbb. The option code no longer writes a space of its own after an opening bracket: <p>(<option>o2</option>w3</p> gave ( o2w3 and now gives (o2 w3, as a select list in that place does. A line end of the source before such an option is one space in Markdown (#846).

  • A <title> before the body content of a page with no <head> tag is the document title, as in a browser. <title>T</title><div><p>one</p></div>tail gave T, one and tail as body text and no front matter. It now gives the front matter title: T, then one and tail. With extract_metadata off the title is not written. A <title> between </head> and the body content is the document title too: <head></head><title>T</title><p>one</p> gave T and one. A <title> after body content does not move. A page whose only metadata is an empty title gets no front matter block: <head><title></title></head><p>one</p> gave ---, --- and one, and now gives one (#816).

  • A page with a structured data script keeps its text when a text value of the JSON holds a tag. <script type="application/ld+json">{"a":"<p>"}</script> in the head made the whole page convert to an empty string, and the same script in the body removed the text after it. The JSON in the metadata keeps the tags of its values: {"a":"<p>Nice</p>"} gave {"a":"Nice"} and now gives the JSON as written. The end tag of the script can have any spelling a browser reads (</SCRIPT>, </script >, </script/>); each of these also gave an empty page. A type written with a character reference (application/ld&#43;json) is read as structured data (#818).

  • The options of a select list are separate words instead of one joined word. A select list with the options Quickstart, Installation and Ruby 101 gave QuickstartInstallationRuby 101 and now gives Quickstart Installation Ruby 101; a label, a select list and a text area in one form gave NameOneTwoarea words and now give Name One Two area words. Both converters give the same text for output, meter and progress elements. Such a control in an inline element (a label, a span, bold text, a custom element) stays in its line, as a browser shows it: <label><button>One</button></label>items gave Oneitems and now gives One items, and <span><button>One</button></span>items gave One, a blank line and items, and now gives One items. A block that holds such a control still ends the line after it. An input writes no text and adds no space: <p>Name<input>Mail</p> gives NameMail. Inside pre and code, a button, an output, a meter, a progress bar or a text area adds no space: <pre>before<button>Go</button>after</pre> gives beforeGoafter. A select list there keeps its options as separate words (#752).

  • The label attribute of an option group is no longer written. It is not text of the page: a browser shows it only inside the open list. A select list with the groups Getting Started (option Quickstart) and Build (option Commands) gave **Getting Started**, a line break, Quickstart**Build**, a line break and Commands, and now gives Quickstart Commands (#776).

  • An element with no end tag ends where the HTML standard says: at the end tag of its parent, or at a start tag that cannot be its content. Before, a paragraph with no end tag stayed open after its parent ended, so each <div class="note"><p>Note</div> put the rest of the page two levels deeper, and after 30 such blocks the page was cut at the depth limit with a depth_limit_exceeded warning. A page of 80 such blocks and a footer gave 30 notes and no footer; it gives 80 notes and the footer, with no warning. This changes the default output for other pages that omit an end tag: <div><p>one</div>tail gave onetail and gives one, a blank line, tail. <blockquote><p>quoted</blockquote><p>after</p> gave after inside the quote and gives it after the quote. A paragraph after a table whose last cell has no end tag was written into that cell and is written after the table. <nav><p>one</nav><aside><p>two</aside>tail gave an empty document and gives two and tail. <table><thead><tr><th>a<th>b<tbody><tr><td>c<td>d</table> gave a table of one cell and gives both rows. A document with no </head> wrote its title into the body, or wrote nothing with extract_metadata = false; it writes its body. <p><ruby>a<rt>b<rt>c</ruby> after gave a(b(c after)) and gives a(b)(c) after. <h2>one<h3>two</h3>three gave ## onetwothree and gives two headings and a paragraph. <p>one<blockquote>two</blockquote>three gave a blank line between one and the quote and gives none, as the same input with </p> written always did. A page that ends with an element open converts as the same page with every end tag written: <body><article><p>one</article><header>site</header><p>two</p> gave one, site and two, and gives one and two, because a <header> directly in the body is a page header. <body><main><p>one</main><header>late</header> loses late by the same rule. A page that omits an end tag is parsed a second time, by the HTML tree builder. Each of 11 recorded Docusaurus pages of 33 to 143 KB takes 1.3 to 6.1 ms more (median 3.2 ms), which is 1.9 to 2.5 times as long, and the 70 recorded pages together take 290 ms in place of 252 ms. Pages with every end tag are not affected. The second parse is given up when it holds more than 512 elements open, which is the depth a browser builds. Such a page converts as it did before, so its omitted end tags are not repaired and it can still lose its tail. A repair that would lose text is not used: the text of the page is counted before and after the second parse, and a page that comes back with less text converts as it did before. A page that a <frameset> replaces is such a page: the tree builder drops the text after </frameset>, and the converter writes it. The omitted end tags of such a page are not repaired. A fragment with no <body> tag keeps its top-level <header> when it is parsed a second time. Before, the second parse read every fragment as a document and dropped that <header> as a page header: <header>h</header><b><p>one</p></b> gave **one** and gives h and **one**, and <header>h</header><div><p>one</div>tail gives h, one and tail. The depth limit and its warning are unchanged for a page that really nests that deep. Past the depth limit, where the converter warns, the number of empty tables before the cut can differ; no text is lost. Two inputs are not repaired: an element that its parent ended and that gets its own end tag later (<div><p>one</div>two</p>rest</div>tail), and an unquoted attribute value that runs into an end tag (<div class=a</div>) (#772).

  • Markdown and Djot output write one space between the text of a <button> and a word or a button right beside it when the source has no white space between them, as plain text output does. <p><button>All Methods</button><button>Instance Methods</button></p> gave All MethodsInstance Methods. Where the source has white space, the output is the same.

  • An inline <svg> keeps its text and no longer adds the words SVG Image. Its text is its aria-label, the <title> and <desc> of the graphic, its <text> elements and the HTML in a <foreignObject>, in document order. Style sheets, scripts, metadata and the content of <defs> and <symbol> are not text, and a <use> reference is not followed. A <switch> gives the child that a reader of English gets. An element with display="none" or visibility="hidden" gives nothing, as hidden text outside a graphic gives nothing. aria-hidden="true" removes the label, the title and the description. That text is the alt text of the image, and it is what inline_data_media = alt_text_only, a heading and plain text output write, with the escaping of any other text. A graphic with no text writes nothing there, and an image with an empty alt text when the payload is kept. An icon link no longer takes the style sheet of its graphic as its label (#750).

  • A graphic in a heading is written as its text also with extract_metadata = false and highlight_style = none. With those options it was written as a data: image, because the fast converter has no rule for a heading. It now leaves a page with a graphic in a heading, with a hidden element in a graphic, or with a link that has a name and no text, to the full converter (#766).

  • Two page shapes no longer take quadratic time in the pass that removes hidden elements: many tag starts with no end (<a and a space, repeated), and many attribute values with no closing quote (<g a=" repeated). A 120 KB page with 40,000 such tag starts in a graphic took 16 seconds; 200,000 of them now take 20 milliseconds. The pass reads each tag once. A < inside a tag is part of an attribute value there, so an attribute value that holds markup is no longer cut. Other page shapes are still slow (#765).

  • Text that is only white space no longer makes the conversion fail when include_document_structure is on, and build_document_structure no longer panics on it. The Markdown is the same as with the structure off. Neither builder records an empty heading, paragraph or list item (#749).

  • A code block inside a list item keeps the indentation of every line. A line after a blank line got four spaces for each list level in place of its own indentation, so <ol><li><p>Save this:</p><pre>def f(x):\n if x:\n\n return 1\n</pre></li></ol> wrote return 1 at the level of if x:. It now writes it eight spaces in, as in the page (#769).

  • A code block whose lines are separate block elements has one line for each. A div, section or other plain container inside a pre starts a line and ends a line, as in a browser, and adds no blank line: <pre><div>a<br></div><div>b<br></div></pre> wrote a, a blank line, b and now writes a, b. An empty container is no line. A line feed between two containers is still a blank line, because a browser shows one (#770).

  • Two or more blank lines in a row inside a fenced code block stay, and so do the spaces at the end of a line of code: <pre>import a\n\n\nclass B:\n</pre> wrote one blank line and now writes two. The rules that fold blank lines and trim line ends still apply to the text outside of code (#783).

  • With code_block_style = indented, a code block that starts a block quote keeps the four spaces of its first line. Without them a Markdown reader takes the code for a paragraph: <blockquote><pre>a\nb\n</pre></blockquote> wrote > a, > b and now writes > a, > b. With that style the blank lines and the spaces at the end of a line of code also stay, at the top level, in a block quote and in a list item: <pre>a \n\n\nb\n</pre> wrote " a \n\n b" and now writes " a \n\n\n b" (#799).

  • With code_block_style = indented, a code block that starts the description of a definition list keeps the four spaces of its first line, and a blank line goes between the term and the code: the full converter wrote "t\na\n b" for <dl><dt>t</dt><dd><pre>a\nb\n</pre></dd></dl>, and the full and fast converters now write "t\n\n a\n b". The spaces at the end of the last line of that code stay too (#799).

  • Add expand_abbreviations and include_blockquote_citations options, enabled by default.

  • Keep one blank quote line between lists and blocks, preserving blank lines inside code.

  • Convert repeated unfinished tags, unclosed hidden elements, and inline list fragments with linear scans.

  • Repair a page that ends a paragraph again after the end tag of its parent, or whose head has no end tag, from the first parse with no second tokenizer pass; at 512 levels the repair stops and the input after that point is converted as written, past the node budget of the repair the whole page is converted as written, each with a malformed_html warning.

  • A line break in the source before an inline element is one space between two words, in every container. Before, the words on the two sides of a <span> were joined, with an empty span and with a span that holds text. This changes the default output: <p>hard to read\n<span id="index-0"></span>docstrings</p> gave hard to readdocstrings and gives hard to read docstrings, <p>one\n<span>two</span> three</p> gave onetwo three and gives one two three, and <ul><li>one\n<span id="a"></span>two</li></ul> gave - onetwo and gives - one two. Outside a paragraph the line break before any other inline element was a line break, and it is a space now, as a browser shows it: <div>one\n<b>y</b></div> gave one and **y** on two lines and gives one **y**. A line break before a block stays a line break, and so does a line break before an inline element whose content starts with a block (#778).

  • White space on the two sides of the start of an inline element is one space, and it goes outside the marks of the element: <p>one <b> y</b>two</p> gave one **y**two with two spaces and gives one **y**two. The same holds for <kbd>, <samp>, <abbr>, <dfn>, <del>, <ins>, <mark>, <sub> and <sup>. At the start of a line such an element starts with no space: <div>a<br><sup> x</sup></div> gave a space and x on the second line and gives x.

  • A line break is no space when an element or a comment stands between it and a zero-width space, as in a browser: the zero-width space is a place where a line can break, so the two parts are one word. <p>one \n <span></span>&#8203;two</p> gave one, a space, the zero-width space and two, and gives one, the zero-width space and two. The line break can be the last content of an element that only wraps text: <p><span>one\n</span>&#8203;two</p> gave one, a space, the zero-width space and two, and gives one, the zero-width space and two. Two or more line breaks are one line break there: <p>one\n\n<span></span>&#8203;two</p> gave two paragraphs and gives one word. A space that is not a line break stays. The converter keeps the space before a zero-width space only when the style attribute of the element between them, or of an element around them, sets display or white-space: <p>one\n<span style="display:inline-block"></span>&#8203;two</p> keeps the space, and <p>one\n<span style="color:red"></span>&#8203;two</p> gives one word. A line break directly before the zero-width space in the same text is not changed: <p>one\n&#8203;two</p> keeps its line break.

  • A <footer>, a <section>, an <article>, an <aside>, a <header> and a <main> start with no space. White space at the start of a block is no space, and the full converter wrote one there. This changes the default output: x<footer> Logo</footer> gave x and then Logo with a space at the start of its line, and gives x and then Logo with none. The same holds for an inline element at the start: x<footer><b> Logo</b></footer> gave a space and **Logo** and gives **Logo**.

  • The strict white space mode writes what it wrote before these changes.

  • The white space after an image, an inline graphic, a video or a form control at the start of a document is kept. This changes the default output: <p><img src="/i.png" alt="alt"> text</p> gave ![alt](/i.png)text and gives ![alt](/i.png) text, and <p><a href="/x"><img src="/i.png" alt="alt"> text</a></p> gave [![alt](/i.png)text](/x) and gives [![alt](/i.png) text](/x). With no white space in the source the output has none (#762).

  • Blocks inside a link label or a heading are separate words at every depth of nesting. This changes the default output: <a href="/x"><div><div>Next</div><div>Cross-references</div></div></a> gave [NextCross-references](/x) and gives [Next Cross-references](/x), and <h2><p>a</p><p>b</p></h2> gave ## ab and gives ## a b. Inline content beside a block in a link no longer gets a space that the source does not have: <a href="/x"><b>H</b>ello<div>x</div></a> gave [**H** ello x](/x) and gives [**H**ello x](/x). The text of an image stays a word of its own there: <a href="/x"><img src="/i.png" alt="Logo"><span>Docs</span><p>desc</p></a> gives [Logo Docs desc](/x), as before (#751).

  • An inline element that holds only a tab is one space: <p>one<span>\t</span>two</p> gave one, a tab and two, and gives one two.

  • White space on the two sides of an element that writes nothing is one space, also in a table cell: <p>one <span id="a"></span> two</p> gave one two with two spaces and gives one two, and <p><span>one </span> two</p> does the same. The rule holds for every element that writes nothing: an image that inline_data_media: DropElement removes, a link with no name, an element that a visitor skips. With DropElement, <p>Before <img src="data:image/png;base64,AAAA" alt="icon"> after</p> gave Before after and gives Before after.

  • A no-break space in an element of its own is kept after a space: <p>one <span>&nbsp;</span> two</p> gave one two and gives one, a space, the no-break space, a space and two. A no-break space in running text is written as a space, as before. In a link label a no-break space beside a space is one space on both converters.

  • A no-break space that starts a text is kept after a space when an element with no text stands between the two: <p>a <span></span>&nbsp;b</p> and <p>a <img>&nbsp;b</p> give a, two spaces and b, as a browser shows them. &nbsp;, &#160;, &#xA0; and the character do the same. An element that holds only white space has no text: <p>a <span> </span>&nbsp;b</p> gives the same. After a span whose text ends with a space the no-break space is kept too: <p>a <span>x </span>&nbsp;b</p> gives a x, two spaces and b. A line end before an empty span and the no-break space after it are one space. After a <br> in a heading and at the start of an element the no-break space is still the one space. After a <br> in a table cell the no-break space is kept, also in a heading in the cell: <td>a<br>&nbsp;b</td> gives a, two spaces and b, as before. Inside one text, and with only a comment between the two, a space and a no-break space are one space, as before.

  • Plain text output writes each term and each description of a definition list as a block of its own, as Markdown output does. Before, the words joined: <dl><dt>Bread</dt><dd>Baked dough.</dd></dl> gave BreadBaked dough.. A <dt> or a <dd> outside a <dl> is a block too.

  • Plain text output writes the caption of a table as a block of its own before the rows. Before, the caption text was lost, and a table with only a caption wrote nothing. A caption that exclude_selectors names is not written.

  • A visitor sees a form inside a heading again, as in 3.17.2. Before, the form text stayed in the heading and the visitor was not called. With no visitor the output is the same as before (#906).

  • Rust dependencies and all generated bindings, documentation, test applications and E2E suites were refreshed with Alef 0.105.0.
  • HTML highlight output now preserves leading and trailing whitespace inside <mark> boundaries (#744).
  • Whitespace between adjacent inline images is preserved instead of joining their Markdown output (#746).
  • Blank lines in image alternative text are encoded without losing line feeds or producing invalid Markdown image labels (#747).
  • Caller-provided base_url values now resolve relative URLs without being emitted as document base metadata when the source has no <base href> (#743).
  • Structure extraction now records inline annotations during the conversion traversal, including links and inline formatting, while preserving visitor, exclusion and depth semantics (#741).
  • The WASM converter now rejects inputs above a configurable 2 MiB default limit with a typed error, preventing unexpectedly large allocations in browser and edge runtimes (#508).
  • WASM class-valued getters and setters now use explicit detached-copy semantics; callers reassign modified values rather than mutating an ineffective borrowed wrapper (#729).
  • Conversion reuses validated parser state and precomputed sibling context, and raw-text stripping uses byte-search skipping, reducing repeated DOM and scan work without changing output (#649, #715).
  • Rust and polyglot dependencies, supported toolchains and generated bindings were refreshed; Alef is pinned to 0.103.14.
  • CI now uses baseline-free quality gates, stricter delegated-workflow checks and reliable benchmark timing and regression thresholds (#736, #738).