From e0eb8f63258bfbef63f6ba7b385c2a4ddf5c1432 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 6 Jun 2023 08:21:18 +0000 Subject: [PATCH] py-markdown-it-py: update to 3.0.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 3.0.0 - 2023-06-03 ⚠️ This release contains some minor breaking changes in the internal API and improvements to the parsing strictness. **Full Changelog**: ### ⬆️ 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](https://github.com/executablebooks/markdown-it-py/pull/276) * ♻️ Parse entities to `text_special` token [#280](https://github.com/executablebooks/markdown-it-py/pull/280) * ♻️ Refactor: Add linkifier rule to inline chain for full links [#279](https://github.com/executablebooks/markdown-it-py/pull/279) * ‼️ Remove `(p)` => `§` replacement in typographer [#281](https://github.com/executablebooks/markdown-it-py/pull/281) * ‼️ Remove unused `silent` arg in `ParserBlock.tokenize` [#284](https://github.com/executablebooks/markdown-it-py/pull/284) * 🐛 FIX: numeric character reference passing [#272](https://github.com/executablebooks/markdown-it-py/pull/272) * 🐛 Fix: tab preventing paragraph continuation in lists [#274](https://github.com/executablebooks/markdown-it-py/pull/274) * 👌 Improve nested emphasis parsing [#273](https://github.com/executablebooks/markdown-it-py/pull/273) * 👌 fix possible ReDOS in newline rule [#275](https://github.com/executablebooks/markdown-it-py/pull/275) * 👌 Improve performance of `skipSpaces`/`skipChars` [#271](https://github.com/executablebooks/markdown-it-py/pull/271) * 👌 Show text of `text_special` in `tree.pretty` [#282](https://github.com/executablebooks/markdown-it-py/pull/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](https://github.com/executablebooks/markdown-it-py/pull/270), thanks to [@hukkinj1](https://github.com/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. ```md
I can indent as much as I want here.
``` See [#260](https://github.com/executablebooks/markdown-it-py/pull/260) ### 🔧 Maintenance changes Strict type annotation checking has been applied to the whole code base, [ruff](https://github.com/charliermarsh/ruff) is now used for linting, and fuzzing tests have been added to the CI, to integrate with Google [OSS-Fuzz](https://github.com/google/oss-fuzz/tree/master/projects/markdown-it-py) testing, thanks to [@DavidKorczynski](https://github.com/DavidKorczynski). * 🔧 MAINTAIN: Make type checking strict [#](https://github.com/executablebooks/markdown-it-py/pull/267) * 🔧 Add typing of rule functions [#283](https://github.com/executablebooks/markdown-it-py/pull/283) * 🔧 Move linting from flake8 to ruff [#268](https://github.com/executablebooks/markdown-it-py/pull/268) * 🧪 CI: Add fuzzing workflow for PRs [#262](https://github.com/executablebooks/markdown-it-py/pull/262) * 🔧 Add tox env for fuzz testcase run [#263](https://github.com/executablebooks/markdown-it-py/pull/263) * 🧪 Add OSS-Fuzz set up by @DavidKorczynski in [#255](https://github.com/executablebooks/markdown-it-py/pull/255) * 🧪 Fix fuzzing test failures [#254](https://github.com/executablebooks/markdown-it-py/pull/254) --- textproc/py-markdown-it-py/Makefile | 6 +++--- textproc/py-markdown-it-py/PLIST | 28 ++++++++++++++++------------ textproc/py-markdown-it-py/distinfo | 8 ++++---- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/textproc/py-markdown-it-py/Makefile b/textproc/py-markdown-it-py/Makefile index ccb26011a497..b64f7d03aaad 100644 --- a/textproc/py-markdown-it-py/Makefile +++ b/textproc/py-markdown-it-py/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2023/03/05 07:27:37 adam Exp $ +# $NetBSD: Makefile,v 1.4 2023/06/06 08:21:18 wiz Exp $ -DISTNAME= markdown-it-py-2.2.0 +DISTNAME= markdown-it-py-3.0.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= textproc python MASTER_SITES= ${MASTER_SITE_PYPI:=m/markdown-it-py/} @@ -15,7 +15,7 @@ DEPENDS+= ${PYPKGPREFIX}-mdurl>=0.1:../../www/py-mdurl USE_LANGUAGES= # none -PYTHON_VERSIONS_INCOMPATIBLE= 27 +PYTHON_VERSIONS_INCOMPATIBLE= 27 37 post-install: cd ${DESTDIR}${PREFIX}/bin && \ diff --git a/textproc/py-markdown-it-py/PLIST b/textproc/py-markdown-it-py/PLIST index 493df6924889..faae2a00d07c 100644 --- a/textproc/py-markdown-it-py/PLIST +++ b/textproc/py-markdown-it-py/PLIST @@ -1,14 +1,5 @@ -@comment $NetBSD: PLIST,v 1.1 2023/02/20 10:52:16 adam Exp $ +@comment $NetBSD: PLIST,v 1.2 2023/06/06 08:21:18 wiz Exp $ bin/markdown-it-${PYVERSSUFFIX} -${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER -${PYSITELIB}/${WHEEL_INFODIR}/LICENSE -${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.markdown-it -${PYSITELIB}/${WHEEL_INFODIR}/METADATA -${PYSITELIB}/${WHEEL_INFODIR}/RECORD -${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED -${PYSITELIB}/${WHEEL_INFODIR}/WHEEL -${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json -${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt ${PYSITELIB}/markdown_it/__init__.py ${PYSITELIB}/markdown_it/__init__.pyc ${PYSITELIB}/markdown_it/_compat.py @@ -103,6 +94,8 @@ ${PYSITELIB}/markdown_it/rules_core/smartquotes.py ${PYSITELIB}/markdown_it/rules_core/smartquotes.pyc ${PYSITELIB}/markdown_it/rules_core/state_core.py ${PYSITELIB}/markdown_it/rules_core/state_core.pyc +${PYSITELIB}/markdown_it/rules_core/text_join.py +${PYSITELIB}/markdown_it/rules_core/text_join.pyc ${PYSITELIB}/markdown_it/rules_inline/__init__.py ${PYSITELIB}/markdown_it/rules_inline/__init__.pyc ${PYSITELIB}/markdown_it/rules_inline/autolink.py @@ -117,12 +110,16 @@ ${PYSITELIB}/markdown_it/rules_inline/entity.py ${PYSITELIB}/markdown_it/rules_inline/entity.pyc ${PYSITELIB}/markdown_it/rules_inline/escape.py ${PYSITELIB}/markdown_it/rules_inline/escape.pyc +${PYSITELIB}/markdown_it/rules_inline/fragments_join.py +${PYSITELIB}/markdown_it/rules_inline/fragments_join.pyc ${PYSITELIB}/markdown_it/rules_inline/html_inline.py ${PYSITELIB}/markdown_it/rules_inline/html_inline.pyc ${PYSITELIB}/markdown_it/rules_inline/image.py ${PYSITELIB}/markdown_it/rules_inline/image.pyc ${PYSITELIB}/markdown_it/rules_inline/link.py ${PYSITELIB}/markdown_it/rules_inline/link.pyc +${PYSITELIB}/markdown_it/rules_inline/linkify.py +${PYSITELIB}/markdown_it/rules_inline/linkify.pyc ${PYSITELIB}/markdown_it/rules_inline/newline.py ${PYSITELIB}/markdown_it/rules_inline/newline.pyc ${PYSITELIB}/markdown_it/rules_inline/state_inline.py @@ -131,11 +128,18 @@ ${PYSITELIB}/markdown_it/rules_inline/strikethrough.py ${PYSITELIB}/markdown_it/rules_inline/strikethrough.pyc ${PYSITELIB}/markdown_it/rules_inline/text.py ${PYSITELIB}/markdown_it/rules_inline/text.pyc -${PYSITELIB}/markdown_it/rules_inline/text_collapse.py -${PYSITELIB}/markdown_it/rules_inline/text_collapse.pyc ${PYSITELIB}/markdown_it/token.py ${PYSITELIB}/markdown_it/token.pyc ${PYSITELIB}/markdown_it/tree.py ${PYSITELIB}/markdown_it/tree.pyc ${PYSITELIB}/markdown_it/utils.py ${PYSITELIB}/markdown_it/utils.pyc +${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER +${PYSITELIB}/${WHEEL_INFODIR}/LICENSE +${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.markdown-it +${PYSITELIB}/${WHEEL_INFODIR}/METADATA +${PYSITELIB}/${WHEEL_INFODIR}/RECORD +${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED +${PYSITELIB}/${WHEEL_INFODIR}/WHEEL +${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json +${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt diff --git a/textproc/py-markdown-it-py/distinfo b/textproc/py-markdown-it-py/distinfo index e0bceffe2320..82b93224a1df 100644 --- a/textproc/py-markdown-it-py/distinfo +++ b/textproc/py-markdown-it-py/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.2 2023/03/05 07:27:37 adam Exp $ +$NetBSD: distinfo,v 1.3 2023/06/06 08:21:18 wiz Exp $ -BLAKE2s (markdown-it-py-2.2.0.tar.gz) = acc8bf0cd757c6027db4716829bb250f594d43c2fdc61ba7885621f666397536 -SHA512 (markdown-it-py-2.2.0.tar.gz) = 3b9b8d91dd21cdc750025588fe489ad82b1f9003fdb50b179c4657f2c1fdc3a69c32d7532896fc2303a544e4576dada30ea7ec139024983aa693f93d17df3a34 -Size (markdown-it-py-2.2.0.tar.gz) = 67120 bytes +BLAKE2s (markdown-it-py-3.0.0.tar.gz) = 6dce14563475d1c36927e0b3b9b81923a37e6b8d7c9626967d9fd858383e5488 +SHA512 (markdown-it-py-3.0.0.tar.gz) = a862b450ad1d530320d9ece7b2dc370152105c568e9d79df622aaba84b986a3e24326f6cbca313d66edf9a61823d91076b815f81b978fae663d6d7cc239a5ac1 +Size (markdown-it-py-3.0.0.tar.gz) = 74596 bytes