Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* ✨ Add `--enable-tables` to the CLI for file, standard input and interactive parsing in [#422](https://github.com/executablebooks/markdown-it-py/pull/422)
* 🐛 Fix CLI interactive mode joining input lines with an extra newline, which split every line into its own paragraph and broke hard line breaks, in [#172](https://github.com/executablebooks/markdown-it-py/issues/172)
* 📚 Document the Python renderer constructor contract.
* 🔧 Drop the optional dependency on the `commonmark` package and its benchmark, since the upstream package is unmaintained, in [#401](https://github.com/executablebooks/markdown-it-py/pull/401)

## 4.2.0 - 2026-05-07

Expand Down
8 changes: 0 additions & 8 deletions benchmarking/bench_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ def test_mistune(benchmark, spec_text):
benchmark(mistune.markdown, spec_text)


@pytest.mark.benchmark(group="packages")
def test_commonmark_py(benchmark, spec_text):
import commonmark

benchmark.extra_info["version"] = "0.9.1"
benchmark(commonmark.commonmark, spec_text)


@pytest.mark.benchmark(group="packages")
def test_pymarkdown(benchmark, spec_text):
import markdown
Expand Down
3 changes: 2 additions & 1 deletion docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tox -e py311-bench-packages -- --benchmark-columns mean,stddev
| mistune[^2] | 3.0.1 | 80.409 | 2.335 |
| **markdown-it-py** | 3.0.0 | 97.242 | 4.427 |
| mistletoe | 1.1.0 | 99.633 | 4.628 |
| commonmark-py | 0.9.1 | 300.403 | 9.706 |
| commonmark-py[^3] | 0.9.1 | 300.403 | 9.706 |
| pymarkdown | 3.4.3 | 387.775 | 10.394 |
| pymarkdown (+extras) | 3.4.3 | 646.564 | 11.316 |
| panflute | 2.3.0 | 860.105 | 208.607 |
Expand All @@ -26,3 +26,4 @@ As you can see, `markdown-it-py` doesn't pay with speed for its flexibility.
[^2]: `mistune` is not CommonMark compliant, which is what allows for its
faster parsing, at the expense of issues, for example, with nested inline parsing.
See [mistletoe's explanation](https://github.com/miyuchina/mistletoe/blob/master/performance.md) for further details.
[^3]: `commonmark-py` is deprecated and no longer maintained (its last release was in 2019), so it has been removed from the benchmark suite; the figures shown are from the last run that included it.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Documentation = "https://markdown-it-py.readthedocs.io"

[project.optional-dependencies]
compare = [
"commonmark~=0.9",
"markdown~=3.4",
"mistletoe~=1.0",
"mistune~=3.0",
Expand Down
Loading