Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 23:04
· 18 commits to main since this release

v2.0.0

A rework into one small API over many Markdown parsers. Breaking: the old classes, processor registries and MkDocs helpers are gone.

Features

  • to_html(text, parser=..., options=MarkdownOptions(...), **parser_options) over comrak, pyromark, markdown-it-pyrs, cmarkgfm, mistune, marko, markdown2 and Python-Markdown (7c7ac6b)
  • common options (tables, strikethrough, autolinks, task lists, footnotes, heading ids, alerts, math, definition lists, hard breaks, smart punctuation, raw HTML, front matter) mapped onto every parser; supported_options per parser; unsupported options warn, or raise with on_unsupported="raise"
  • typed parser-specific options; get_parser, list_parsers, register_parser; a missing package names the extra to install
  • to_markdown(html, converter=..., options=HtmlToMarkdownOptions(...)) over htmd and markdownify
  • sanitize (nh3), extract_title, split_front_matter
  • front matter is dropped by default (bc6cdd2)

Removed

  • Python-Markdown / MkDocs simulation (extensions.py, admonition converter, epregistry), the pre/tree/post processor registries, ElementTree/lxml tree processing, bleach, prettify, the GitHub API parser

Documentation

  • README rewritten for the new API (7cbc8a7)