Skip to content

Releases

v0.7.0

Choose a tag to compare

@letmutex letmutex released this 29 Nov 10:42

What's Changed

New Contributors

Full Changelog: v0.6.1...v0.7.0

v0.6.1

Choose a tag to compare

@letmutex letmutex released this 24 Nov 01:44

What's Changed

  • Skip link text line break encoding in literal context by @letmutex in #167

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@letmutex letmutex released this 18 Nov 05:39
c1b4658

Breaking Changes

  • DOM backend & opaque node API:
    • Switched the default DOM backend to ego-tree, which is faster than markup5ever_rcdom backend.
    • markup5ever_rcdom is now optional behind the rcdom feature.
    • Replaced markup5ever_rcdom::Node with htmd::node::{Tree, Node}, and changed HtmlToMarkdown::html_to_tree to return std::io::Result<Tree>.
  • Unified convert input:
    • Removed HtmlToMarkdown::tree_to_markdown.
    • htmd::convert and HtmlToMarkdown::convert are now generic over ConvertInput (strings, Tree, Node, and Rc<markup5ever_rcdom::Node> with rcdom).
  • Handler & Element signatures:
    • ElementHandler::handle, Handlers::fallback, and custom handler closures now take &Element instead of Element by value.
    • Element.node is now &htmd::node::Node;
    • Removed Element.attrs and Element.markdown_translated.
    • Added Element.context: Context.
    • Handlers::handle and Handlers::walk_children now accept (&Node<'_>, Context).

New Features

  • Dual DOM backends (ego-tree & rcdom): Added an ego-tree backend as the default while retaining rcdom as a Cargo feature, along with a htmd::node API for traversing and inspecting trees.
  • Conversion lifecycle events: Added declarative EventSubscription / EventTypes and ElementHandler hooks.
  • Custom comment handling: Added CommentHandler and HtmlToMarkdownBuilder::comment_handler.
  • Context-aware translation & Options ergonomics: Added Context / ContextKind (block vs. inline & literal tracking).

Fixes & Improvements

  • Correctness: Massive correctness fixes for Faithful mode, a huge thanks to @bjones1!
  • Speed: Conversion is now 10% - 20% faster (the default ego-tree backend vs rcdom/v0.5.6).

New Contributors

Full Changelog: v0.5.5...v0.6.0


Thank you to all contributors! To migrate from an older version, see docs/migration.md.

v0.5.6

Choose a tag to compare

@letmutex letmutex released this 15 Oct 03:31
  • Preserve line breaks in code block spans

Full Changelog: v0.5.5...v0.5.6

v0.5.5

Choose a tag to compare

@letmutex letmutex released this 27 Jul 03:40

What's Changed

Full Changelog: v0.5.4...v0.5.5

v0.5.4

Choose a tag to compare

@letmutex letmutex released this 04 Apr 10:22

What's Changed

  • Update: lib version. by @bjones1 in #73
  • Add: provide an an interface to the DOM tree, in addition to a string of HTML. by @bjones1 in #74

Full Changelog: v0.5.3...v0.5.4

v0.5.3

Choose a tag to compare

@letmutex letmutex released this 24 Mar 09:49

What's Changed

  • Fix panic on multi-byte UTF-8 chars in ordered list escape by @krystophny in #72

New Contributors

Full Changelog: v0.5.2...v0.5.3

v0.5.2

Choose a tag to compare

@letmutex letmutex released this 21 Mar 13:25

What's Changed

  • Fix layout table flattening in pure mode by @letmutex in #71

Full Changelog: v0.5.1...v0.5.2

v0.5.1

Choose a tag to compare

@letmutex letmutex released this 15 Mar 03:34

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@letmutex letmutex released this 24 Nov 09:34
3d71970

What's Changed

Full Changelog: v0.4.0...v0.5.0