NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4320 most downloaded on crates.io
Render HTML as plain text.
Last release 5 months ago
19 Apr 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
77 releases · first in 2016
[added] Add support for XHTML (for the cases where it doesn't quite behave like HTML).
[changed] Split html2text example into html2text-cli crate
html2text example into html2text-cli crate[added] Support tags as bold (thanks amir)
One column per quarter.
<b> tags as bold (thanks amir)[changed] Update html5ever and tendril dependencies.
[fixed] Fix a subtract with underflow with rowspans and empty rows (thanks mdierksen)
[fixed] Further fix for RcDom::serialize() when there is a .
<doctype>.[fixed] RcDom::serialize() panicked.
html2term example.Remove debug accidentally left in.
Remove debug accidentally left in.
[added] Add Config::empty_img_mode() to configure how images with no alt text are handled.
Config::empty_img_mode() to configure how images with no alt text
are handled.[changed] Updated MSRV to 1.85.
[fixed] Fix an assertion and some missing styles with rowspan cells in rich mode.
[added] Support handling rowspan in tables.
rowspan in tables.[fixed] Parse tags as if scripting is disabled (thanks craigchiang)
<noscript> tags as if scripting is disabled (thanks craigchiang)<svg> as images (thanks craigchiang)[fixed] Fix whitespace-only tables being shown as "─" (thanks fuelen)
[added] CSS: Support basic attribute selectors (div[attr="bar"]).
div[attr="bar"]).x-syntax rule.<pre> elements.display: x-raw-dom extension (e.g. to colour the HTML)pad_block_width enabled, do a better job of padding blocks.
In particular, the padding gets the block's background colour (when CSS etc.
are being used).…only available in agent and user CSS. This is a breaking change, but is not likely to affect many users.
<pre> blocks
(Config::register_highlighter and CSS x-syntax: foo)display: x-raw-dom, and only if the
css_ext Cargo feature is enabled) are now only available in agent and user CSS.
This is a breaking change, but is not likely to affect many users.[added] RcDom::serialize, and expose a few more of the RcDom types.
RcDom::serialize, and expose a few more of the RcDom types.[changed] Updated dependencies, including html5ever 0.31.
[fixed] An issue with multiple verions of markup5ever being included. (thanks anna-hope)
[fixed] An issue with FragmentStarts being lost (thanks toiletbril)
FragmentStarts being lost (thanks toiletbril)<pre> wrapped past the width
(thanks nshp)[changed] Various small refactors (thanks sftse)
Config::rich() no longer includes decorations around <em> etc. -
use Config::rich().do_decorate() to get the old behaviour.::before/::after and content: "string", which is now
used for simple decorations. With CSS enabled, this allows for customising
the display of <em>foo</em> without writing a decorator.<h5> and <h6> (thanks noahbaculi)config::plain() but can be enabled or disabled with
config.link_footnotes(true/false). The footnote references (e.g. [1]) are added
in the main renderer, and the actual footnotes are written in a default implementation
of TextDecorator::finalise() so can be customised.[fixed] Fixed issue parsing CSS rules with known rules but unknown values, which caused parsing to stop instead of just skipping the unkown rule.
[added] CSS support for :nth-child() (not yet with the of foo).
:nth-child() (not yet with the of foo).display: x-raw-dom for debugging (with css_ext
feature flag).--show-css option to html2text example for debugging what rules were parsed.html2term - I to enable/disable, and arrows to navigate
around the DOM. Implemented using :nth-child and x-raw-dom.[fixed] Fix a debug assertion from a double-counted length increment (thanks JadedBlueeyes).
[fixed] Handle some obsolete bgcolor=... attributes.
bgcolor=... attributes.--show-render to help debugging render issues.[fixed] Fixed errors when building with Rust 1.72.
[added] html2text now has --show-dom
[added] Support CSS white-space: pre-wrap (and normal, pre).
[changed] Updated html5ever and markup5ever crate versions. This has meant updating the MSRV, which is now set to 1.72.
Config::no_link_wrapping() (thanks JadeBlueEyes)from_read etc.) now return
Result<..> instead of panicking (thanks sftse)colspan (thanks pycui)[fixed] Table rows with colours would disappear. (thanks tkapias)
[changed] Replaced LightningCSS with a smaller CSS parser. There is a chance that some CSS edge cases which no longer work; if so this would be a bug.
[changed] Replaced LightningCSS with a smaller CSS parser. There is a chance that some CSS edge cases which no longer work; if so this would be a bug.
[removed] Some previously pub items and methods which are either internal
implementation details or considered redundant have been removed or made
private (thanks sftse). Please open an issue for anything removed that was
being used.
Of note, RenderTree::render_plain() and RenderTree::render_rich() have
been removed. Replace code like:
let text = html2text::parse(html)?
.render_plain(80)?
.into_string()?;
with:
let text = html2text::config::plain()
.render_to_string(html2text::parse(html)?)?
[changed] Some names moved out of text_renderer module, so some use statements
may need updating.
[changed] Replace some unwrap() with improved patterns (thanks sftse).
[changed] Updated some dependencies
Nothing published for this version
[changed] Updated some dependencies
html2text example now has --ignore-css-colour, which ignores CSS
colour information but still uses display: none, for example.html2text example now has --only-css option, to not use
default colours when CSS colours are being used.dashmap depenency optional so it's not included
unnecessarily when CSS isn't enabled (thanks xmakro)[changed] Update the previous max-height: 0 to also look at height: 0 and require overflow: hidden as well. This helps with a hack some e-mail senders
max-height: 0 to also look at height: 0 and require
overflow: hidden as well.
This helps with a hack some e-mail senders use for e-mail previews. (thanks tkapias)[changed] Treat max-height: 0 as if it's display: none when CSS is enabled. This helps with a hack some e-mail senders use for e-mail previews. (thank
max-height: 0 as if it's display: none when CSS is enabled.
This helps with a hack some e-mail senders use for e-mail previews. (thanks tkapias)[changed] Bump version of lightningcss dependency to fix build failures.
[fixed] Fix a case where Err(TooNarrow) was returned unnecessarily. (thanks sftse)
Config::raw_mode() and
Config::no_table_borders() (thanks sftse)[changed] Updated termion dev-dependency
<sup> HTML elementsRcDom publically. It was already returned by a pub function.Config::allow_width_overflow(), prefer returning output wider
than requested, instead of returning Err(TooNarrow).
Config::min_wrap_width() sets the minimum text wrap width (default
3). The minimum width (before overflow or TooNarrow) is now
handled more cleanly.[fixed] CSS: rules marked !important were ignored.
log crate.[fixed] A panic on some unlucky text wrapping coincidences.
[fixed] CSS: Ignore transparent colours.
[fixed] max_width was not working with some render methods.
max_width was not working with some render methods.[added] Simple support for , , and (thanks sgtatham)
<i>, <ins>, and <del> (thanks sgtatham)<td> elements.style attributes.[changed] Updated the termion dev-dependency to 2.0.
[changed] Added cargo categories and update to 2021 edition.
[fixed] CSS didn't work inside or .
<ul> or <ol>.[fixed] Various documentation issues (thanks sgtatham)
[changed] Config::add_css now returns Result instead of panicking on CSS parse errors. Errors from parsing document CSS are ignored.
Config::add_css now returns Result instead of panicking on
CSS parse errors. Errors from parsing document CSS are ignored.<font color=...> when CSS is enabled.Config::max_wrap_width() to wrap text to a norrower width than
the overal size available.[added] CSS: Support more extensive selectors
Config::use_doc_css()
or Config::add_css to use CSS.[added] Now recognised CSS display:none
display:noneConfig::add_css.[changed] Remove some noisy stderr output when encoutering control chars (thanks sftse)
Result. Fixed
some panics and infinite loops. (Thanks WIZeaz for fuzzing)[changed] Improve layout of tables thanks to sftse:
[fixed] Some tables were rendered too wide.
[changed] Rich Image annotations now include the src attirbute (thanks spencerwi).
[fixed] Preserve empty lines in pre blocks (thanks kpagacz).
[fixed] Fix some panics when enumerated lists are in tables (thanks sfts).
[fixed] Fix some panics when very large widths are used with tables.
[changed] Moved the rcdom module directly into src/
[changed] Update the build badges to reflect the updated CI configuration.
[added] New experimental from_read_coloured() (under ansi_colours feature).
from_read_coloured() (under ansi_colours feature).into_tagged_strings and tagged_strings methods to TaggedLine
(thanks Robin Krahl)width method to TaggedString (thanks Robin Krahl)TextRenderer::into_lines (thanks Robin Krahl)///) lines.Your coding agent can read these notes before it upgrades. Set up the MCP server →