Skip to content

Releases: executablebooks/markdown-it-py

v4.2.0

07 May 12:06
36c5f54

Choose a tag to compare

What's Changed

Full Changelog: v4.1.0...v4.2.0

v4.1.0

06 May 16:30
3b4ff6d

Choose a tag to compare

What's Changed

  • โœจ Add --stdin option to CLI by @mcepl in #379
  • Add AGENTS.md and copilot-setup-steps workflow by @Copilot in #380
  • ๐Ÿ”ง Add typing to Scanner by @Alunderin in #382
  • ๐Ÿ‘Œ Fix quadratic complexity in fragments_join / text_join by @petricevich in #389
  • โœจAllow plugins to register inline terminator characters by @Copilot in #391
  • โœจ Add gfm-like2 preset with task lists, alerts, and single-tilde strikethrough by @chrisjsewell in #388
  • ๐Ÿ”ง Update pre-commit hooks by @chrisjsewell in #392
  • ๐Ÿš€ RELEASE v4.1.0 by @chrisjsewell in #393

New Contributors

Full Changelog: v4.0.0...v4.1.0

v4.0.0

11 Aug 12:56
c62983f

Choose a tag to compare

What's Changed

This primarily drops support for Python 3.8 and 3.9, adds support for Python 3.13,
and updates the parser to comply with Commonmark 0.31.2 and Markdown-It v14.1.0.

Upgrades

Improvements

  • ๐Ÿ‘Œ Improve performance of "text" inline rule by @hukkin in #347
  • ๐Ÿ‘Œ Use str.removesuffix by @hukkin in #348
  • ๐Ÿ‘Œ limit the number of autocompleted cells in a table by @chrisjsewell in #364
  • ๐Ÿ‘Œ fix quadratic complexity in reference parser by @chrisjsewell in #367

Bug fixes

  • ๐Ÿ› Fix emphasis inside raw links bugs by @tsutsu3 in #320

Maintenance

Documentation

New Contributors

Full Changelog: v3.0.0...v4.0.0

v3.0.0

03 Jun 06:33
bee6d19

Choose a tag to compare

v3.0.0 Release

โš ๏ธ This release contains some minor breaking changes in the internal API and improvements to the parsing strictness.

Full Changelog: v2.2.0...v3.0.0

โฌ†๏ธ UPGRADE: Drop support for Python 3.7

Also add testing for Python 3.11

โฌ†๏ธ UPGRADE: Update from upstream markdown-it 12.2.0 to 13.0.0

A key change is the addition of a new Token type, text_special, which is used to represent HTML entities and backslash escaped characters.
This ensures that (core) typographic transformation rules are not incorrectly applied to these texts.
The final core rule is now the new text_join rule, which joins adjacent text/text_special tokens,
and so no text_special tokens should be present in the final token stream.
Any custom typographic rules should be inserted before text_join.

A new linkify rule has also been added to the inline chain, which will linkify full URLs (e.g. https://example.com),
and fixes collision of emphasis and linkifier (so http://example.org/foo._bar_-_baz is now a single link, not emphasized).
Emails and fuzzy links are not affected by this.

  • โ™ป๏ธ Refactor backslash escape logic, add text_special #276
  • โ™ป๏ธ Parse entities to text_special token #280
  • โ™ป๏ธ Refactor: Add linkifier rule to inline chain for full links #279
  • โ€ผ๏ธ Remove (p) => § replacement in typographer #281
  • โ€ผ๏ธ Remove unused silent arg in ParserBlock.tokenize #284
  • ๐Ÿ› FIX: numeric character reference passing #272
  • ๐Ÿ› Fix: tab preventing paragraph continuation in lists #274
  • ๐Ÿ‘Œ Improve nested emphasis parsing #273
  • ๐Ÿ‘Œ fix possible ReDOS in newline rule #275
  • ๐Ÿ‘Œ Improve performance of skipSpaces/skipChars #271
  • ๐Ÿ‘Œ Show text of text_special in tree.pretty #282

โ™ป๏ธ REFACTOR: Replace most character code use with strings

The use of StateBase.srcCharCode is deprecated (with backward-compatibility), and all core uses are replaced by StateBase.src.

Conversion of source string characters to an integer representing the Unicode character is prevalent in the upstream JavaScript implementation, to improve performance.
However, it is unnecessary in Python and leads to harder to read code and performance deprecations (during the conversion in the StateBase initialisation).

See #270, thanks to @hukkinj1.

โ™ป๏ธ Centralise indented code block tests

For CommonMark, the presence of indented code blocks prevent any other block element from having an indent of greater than 4 spaces.
Certain Markdown flavors and derivatives, such as mdx and djot, disable these code blocks though, since it is more common to use code fences and/or arbitrary indenting is desirable.
Previously, disabling code blocks did not remove the indent limitation, since most block elements had the 3 space limitation hard-coded.
This change centralised the logic of applying this limitation (in StateBlock.is_code_block), and only applies it when indented code blocks are enabled.

This allows for e.g.

<div>
  <div>

    I can indent as much as I want here.

  <div>
<div>

See #260

๐Ÿ”ง Maintenance changes

Strict type annotation checking has been applied to the whole code base,
ruff is now used for linting,
and fuzzing tests have been added to the CI, to integrate with Google OSS-Fuzz testing, thanks to @DavidKorczynski.

  • ๐Ÿ”ง MAINTAIN: Make type checking strict #
  • ๐Ÿ”ง Add typing of rule functions #283
  • ๐Ÿ”ง Move linting from flake8 to ruff #268
  • ๐Ÿงช CI: Add fuzzing workflow for PRs #262
  • ๐Ÿ”ง Add tox env for fuzz testcase run #263
  • ๐Ÿงช Add OSS-Fuzz set up by @DavidKorczynski in #255
  • ๐Ÿงช Fix fuzzing test failures #254

v2.2.0

22 Feb 05:52
73a0147

Choose a tag to compare

What's Changed

New Contributors

Thanks to ๐ŸŽ‰

Full Changelog: v2.1.0...v2.2.0

v2.1.0

16 Apr 13:51
7e677c4

Choose a tag to compare

What's Changed

  • ๐Ÿ”ง MAINTAIN: Add a profiler tox env by @hukkin in #197
  • ๐Ÿ”ง MAINTAIN: Update performance benchmark by @hukkin in #196
  • โœจ NEW: Save ordered list numbering by @hukkin in #192
  • โฌ†๏ธ UPGRADE: Drop support for EOL Python 3.6 by @hukkin in #194
  • ๐Ÿงช TEST: Space in link destination generates IndexError by @mib112 in #206
  • ๐Ÿ“š DOCS: Fix typos by @kianmeng in #203
  • ๐Ÿ”ง MAINTAIN: Move from setuptools to flit by @chrisjsewell in #208
  • ๐Ÿ“š DOCS: Fix build by @chrisjsewell in #209
  • ๐Ÿ”ง MAINTAIN: Add isort hook by @chrisjsewell in #210
  • โ™ป๏ธ REFACTOR: Move internal Rule/Delimiter to dataclass by @chrisjsewell in #211
  • โ™ป๏ธ REFACTOR: Move Token to dataclass by @chrisjsewell in #212
  • ๐Ÿ“š DOCS: Update usage guide to use PyPI package name by @thibaudcolas in #202
  • ๐Ÿ› FIX: Combination of blockquotes, list and newlines causes IndexError by @hukkin in #207
  • โ™ป๏ธ REFACTOR: slots for dataclasses by @hukkin in #214
  • ๐Ÿš€ RELEASE: v2.1.0 by @chrisjsewell in #213

New Contributors

Full Changelog: v2.0.1...v2.1.0

v2.0.1

24 Jan 17:58
d6adf66

Choose a tag to compare

What's Changed

  • ๐Ÿ› FIX: Crash when file ends with empty blockquote line by @hukkin in #186
  • โœจ NEW: Add inline_definitions option by @chrisjsewell in #187

Full Changelog: v2.0.0...v2.0.1

v2.0.0

03 Dec 08:44
465b54d

Choose a tag to compare

What's Changed

  • โฌ†๏ธ Update: Sync with markdown-it v12.1.0 and CommonMark v0.30 by @hukkin in #168
  • ๐Ÿ“š DOCS: Fix parameter-names and descriptions by @marcusatiliusregulus in #173
  • ๐Ÿงช TESTS: Test against python3.10 by @hukkin in #178
  • ๐Ÿงช TESTS: Add URL normalisation xfail by @hukkin in #170
  • ๐Ÿ› FIX: Always suffix indented code block with newline by @hukkin in #169
  • ๐Ÿ‘Œ IMPROVE: Use all to signal re-exports by @hukkin in #120
  • โ™ป๏ธ REFACTOR: Port mdurl and punycode for URL normalisation by @hukkin in #171
  • ๐Ÿ”ง MAINTAIN: Use pyproject-build for package deployment by @hukkin in #177
  • ๐Ÿ“š DOCS: punycode and mdurl are now used by @hukkin in #179
  • ๐Ÿงช TESTS: Remove needless xfail by @hukkin in #180
  • โ™ป๏ธ REFACTOR: Remove AttrDict by @chrisjsewell in #181
  • ๐Ÿš€ RELEASE: v2.0.0 by @chrisjsewell in #182

New Contributors

  • @marcusatiliusregulus made their first contribution in #173

Full Changelog: v1.1.0...v2.0.0

v1.1.0

08 May 05:22
1d27af1

Choose a tag to compare

v1.0.0

02 May 06:45
b0355bf

Choose a tag to compare

The first stable release of markdown-it-py ๐ŸŽ‰

See CHANGELOG.md