Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-markdown-it-py for
openSUSE:Factory checked in at 2023-03-09 17:45:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-markdown-it-py (Old)
and /work/SRC/openSUSE:Factory/.python-markdown-it-py.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-markdown-it-py"
Thu Mar 9 17:45:27 2023 rev:3 rq:1070245 version:2.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-markdown-it-py/python-markdown-it-py.changes
2022-09-07 11:06:14.900438813 +0200
+++
/work/SRC/openSUSE:Factory/.python-markdown-it-py.new.31432/python-markdown-it-py.changes
2023-03-09 17:45:42.586898262 +0100
@@ -1,0 +2,11 @@
+Mon Mar 6 13:33:26 UTC 2023 - Sebastian Wagner <[email protected]>
+
+- update to version 2.2.0:
+ - What's Changed:
+ - UPGRADE: Allow linkify-it-py v2
+ - FIX: CVE-2023-26303, fix boo#1208974
+ - FIX: CLI crash on non-utf8 character
+ - DOCS: Add section about markdown renderer
+ - Update benchmark pkg versions
+
+-------------------------------------------------------------------
Old:
----
python-markdown-it-py-2.1.0.tar.gz
New:
----
python-markdown-it-py-2.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-markdown-it-py.spec ++++++
--- /var/tmp/diff_new_pack.xJy7DE/_old 2023-03-09 17:45:43.078900880 +0100
+++ /var/tmp/diff_new_pack.xJy7DE/_new 2023-03-09 17:45:43.082900902 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-markdown-it-py
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,8 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-markdown-it-py
-Version: 2.1.0
+Version: 2.2.0
Release: 0
Summary: Python port of markdown-it Markdown parsing
License: MIT
++++++ python-markdown-it-py-2.1.0.tar.gz -> python-markdown-it-py-2.2.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/.github/dependabot.yml
new/markdown-it-py-2.2.0/.github/dependabot.yml
--- old/markdown-it-py-2.1.0/.github/dependabot.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/markdown-it-py-2.2.0/.github/dependabot.yml 2023-02-22
06:52:12.000000000 +0100
@@ -0,0 +1,19 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+#
https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ commit-message:
+ prefix: â¬ï¸
+ schedule:
+ interval: weekly
+ - package-ecosystem: pip
+ directory: /
+ commit-message:
+ prefix: â¬ï¸
+ schedule:
+ interval: weekly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/.github/workflows/benchmark.yml
new/markdown-it-py-2.2.0/.github/workflows/benchmark.yml
--- old/markdown-it-py-2.1.0/.github/workflows/benchmark.yml 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/.github/workflows/benchmark.yml 2023-02-22
06:52:12.000000000 +0100
@@ -12,12 +12,12 @@
- uses: actions/checkout@v2
- name: Set up Python 3.8
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install pandoc
- uses: r-lib/actions/setup-pandoc@v1
+ uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.6'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/.github/workflows/tests.yml
new/markdown-it-py-2.2.0/.github/workflows/tests.yml
--- old/markdown-it-py-2.1.0/.github/workflows/tests.yml 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/.github/workflows/tests.yml 2023-02-22
06:52:12.000000000 +0100
@@ -21,10 +21,10 @@
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: '3.8'
- - uses: pre-commit/[email protected]
+ - uses: pre-commit/[email protected]
tests:
@@ -36,7 +36,7 @@
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -48,7 +48,7 @@
pytest tests/ --cov=markdown_it --cov-report=xml
--cov-report=term-missing
- name: Upload to Codecov
if: matrix.python-version == '3.7' && github.repository ==
'executablebooks/markdown-it-py'
- uses: codecov/codecov-action@v1
+ uses: codecov/codecov-action@v3
with:
name: markdown-it-py-pytests-py3.7
flags: pytests
@@ -64,7 +64,7 @@
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install markdown-it-py
@@ -85,7 +85,7 @@
- uses: actions/checkout@v2
- name: Set up Python 3.8
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: '3.8'
@@ -98,7 +98,7 @@
run: tox -e py38-bench-core -- --benchmark-json bench-core.json
- name: Upload data
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: bench-core
path: bench-core.json
@@ -114,7 +114,7 @@
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.8
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: install flit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/.pre-commit-config.yaml
new/markdown-it-py-2.2.0/.pre-commit-config.yaml
--- old/markdown-it-py-2.1.0/.pre-commit-config.yaml 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/.pre-commit-config.yaml 2023-02-22
06:52:12.000000000 +0100
@@ -16,7 +16,7 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.2.0
+ rev: v4.4.0
hooks:
- id: check-json
- id: check-yaml
@@ -24,23 +24,23 @@
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
- rev: 5.10.1
+ rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
- rev: 22.3.0
+ rev: 23.1.0
hooks:
- id: black
- - repo: https://gitlab.com/pycqa/flake8
- rev: 3.9.2
+ - repo: https://github.com/PyCQA/flake8
+ rev: 6.0.0
hooks:
- id: flake8
- additional_dependencies: [flake8-bugbear==21.3.1]
+ additional_dependencies: [flake8-bugbear~=22.7]
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v0.942
+ rev: v1.0.1
hooks:
- id: mypy
- additional_dependencies: [attrs]
+ additional_dependencies: [mdurl]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/CHANGELOG.md
new/markdown-it-py-2.2.0/CHANGELOG.md
--- old/markdown-it-py-2.1.0/CHANGELOG.md 2022-04-16 15:51:17.000000000
+0200
+++ new/markdown-it-py-2.2.0/CHANGELOG.md 2023-02-22 06:52:12.000000000
+0100
@@ -1,5 +1,30 @@
# Change Log
+## 2.2.0 - 2023-02-22
+
+### What's Changed
+
+* â¬ï¸ UPGRADE: Allow linkify-it-py v2 by @hukkin in
[#218](https://github.com/executablebooks/markdown-it-py/pull/218)
+* ð FIX: CVE-2023-26303 by @chrisjsewell in
[#246](https://github.com/executablebooks/markdown-it-py/pull/246)
+* ð FIX: CLI crash on non-utf8 character by @chrisjsewell in
[#247](https://github.com/executablebooks/markdown-it-py/pull/247)
+* ð DOCS: Update the example by @redstoneleo in
[#229](https://github.com/executablebooks/markdown-it-py/pull/229)
+* ð DOCS: Add section about markdown renderer by @holamgadol in
[#227](https://github.com/executablebooks/markdown-it-py/pull/227)
+* ð§ Create SECURITY.md by @chrisjsewell in
[#248](https://github.com/executablebooks/markdown-it-py/pull/248)
+* ð§ MAINTAIN: Update mypy's additional dependencies by @hukkin in
[#217](https://github.com/executablebooks/markdown-it-py/pull/217)
+* Fix typo by @jwilk in
[#230](https://github.com/executablebooks/markdown-it-py/pull/230)
+* ð§ Bump GH actions by @chrisjsewell in
[#244](https://github.com/executablebooks/markdown-it-py/pull/244)
+* ð§ Update benchmark pkg versions by @chrisjsewell in
[#245](https://github.com/executablebooks/markdown-it-py/pull/245)
+
+### New Contributors
+
+Thanks to ð
+
+* @jwilk made their first contribution in
[#230](https://github.com/executablebooks/markdown-it-py/pull/230)
+* @holamgadol made their first contribution in
[#227](https://github.com/executablebooks/markdown-it-py/pull/227)
+* @redstoneleo made their first contribution in
[#229](https://github.com/executablebooks/markdown-it-py/pull/229)
+
+**Full Changelog**:
<https://github.com/executablebooks/markdown-it-py/compare/v2.1.0...v2.2.0>
+
## 2.1.0 - 2022-04-15
This release is primarily to replace the `attrs` package dependency,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/README.md
new/markdown-it-py-2.2.0/README.md
--- old/markdown-it-py-2.1.0/README.md 2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/README.md 2023-02-22 06:52:12.000000000 +0100
@@ -55,10 +55,9 @@
from mdit_py_plugins.footnote import footnote_plugin
md = (
- MarkdownIt()
+ MarkdownIt('commonmark' ,{'breaks':True,'html':True})
.use(front_matter_plugin)
.use(footnote_plugin)
- .disable('image')
.enable('table')
)
text = ("""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/SECURITY.md
new/markdown-it-py-2.2.0/SECURITY.md
--- old/markdown-it-py-2.1.0/SECURITY.md 1970-01-01 01:00:00.000000000
+0100
+++ new/markdown-it-py-2.2.0/SECURITY.md 2023-02-22 06:52:12.000000000
+0100
@@ -0,0 +1,14 @@
+# Security Policy
+
+## Supported Versions
+
+We generally only support the latest major release,
+although critical bug fixes can be released for older versions.
+
+## Reporting a Vulnerability
+
+To report a security issue, please email <[email protected]> with a
description of the issue,
+the steps you took to create the issue, affected versions, and, if known,
mitigations for the issue.
+Our team will respond within 3 working days of your email.
+If the issue is confirmed as a vulnerability, we will open a Security Advisory.
+This project follows a 90 day disclosure timeline.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/docs/other.md
new/markdown-it-py-2.2.0/docs/other.md
--- old/markdown-it-py-2.1.0/docs/other.md 2022-04-16 15:51:17.000000000
+0200
+++ new/markdown-it-py-2.2.0/docs/other.md 2023-02-22 06:52:12.000000000
+0100
@@ -21,7 +21,7 @@
So, by default `markdown-it` should be safe. We care about it.
-If you find a security problem - contact us via tracker or email.
+If you find a security problem - contact us via <[email protected]>.
Such reports are fixed with top priority.
## Plugins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/docs/using.md
new/markdown-it-py-2.2.0/docs/using.md
--- old/markdown-it-py-2.1.0/docs/using.md 2022-04-16 15:51:17.000000000
+0200
+++ new/markdown-it-py-2.2.0/docs/using.md 2023-02-22 06:52:12.000000000
+0100
@@ -330,7 +330,7 @@
md.render("*a*")
```
-Plugins can support multiple render types, using the `__ouput__` attribute
(this is currently a Python only feature).
+Plugins can support multiple render types, using the `__output__` attribute
(this is currently a Python only feature).
```{code-cell} python
from markdown_it.renderer import RendererHTML
@@ -397,3 +397,29 @@
md.add_render_rule("link_open", render_blank_link)
print(md.render("[a]\n\n[a]: b"))
```
+
+### Markdown renderer
+
+You can also render a token stream directly to markdown via the `MDRenderer`
class from [`mdformat`](https://github.com/executablebooks/mdformat):
+
+```{code-cell} python
+from markdown_it import MarkdownIt
+from mdformat.renderer import MDRenderer
+
+md = MarkdownIt("commonmark")
+
+source_markdown = """
+Here's some *text*
+
+1. a list
+
+> a *quote*"""
+
+tokens = md.parse(source_markdown)
+
+renderer = MDRenderer()
+options = {}
+env = {}
+
+output_markdown = renderer.render(tokens, options, env)
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/__init__.py
new/markdown-it-py-2.2.0/markdown_it/__init__.py
--- old/markdown-it-py-2.1.0/markdown_it/__init__.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/__init__.py 2023-02-22
06:52:12.000000000 +0100
@@ -1,5 +1,5 @@
"""A Python port of Markdown-It"""
__all__ = ("MarkdownIt",)
-__version__ = "2.1.0"
+__version__ = "2.2.0"
from .main import MarkdownIt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/cli/parse.py
new/markdown-it-py-2.2.0/markdown_it/cli/parse.py
--- old/markdown-it-py-2.1.0/markdown_it/cli/parse.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/cli/parse.py 2023-02-22
06:52:12.000000000 +0100
@@ -35,7 +35,7 @@
Parse a Markdown file and dump the output to stdout.
"""
try:
- with open(filename, "r") as fin:
+ with open(filename, "r", encoding="utf8", errors="ignore") as fin:
rendered = MarkdownIt().render(fin.read())
print(rendered, end="")
except OSError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/common/utils.py
new/markdown-it-py-2.2.0/markdown_it/common/utils.py
--- old/markdown-it-py-2.1.0/markdown_it/common/utils.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/common/utils.py 2023-02-22
06:52:12.000000000 +0100
@@ -56,7 +56,6 @@
def isValidEntityCode(c: int) -> bool:
-
# broken sequence
if c >= 0xD800 and c <= 0xDFFF:
return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/helpers/parse_link_label.py
new/markdown-it-py-2.2.0/markdown_it/helpers/parse_link_label.py
--- old/markdown-it-py-2.1.0/markdown_it/helpers/parse_link_label.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/helpers/parse_link_label.py
2023-02-22 06:52:12.000000000 +0100
@@ -9,7 +9,6 @@
def parseLinkLabel(state: StateInline, start: int, disableNested: bool =
False) -> int:
-
labelEnd = -1
oldPos = state.pos
found = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/renderer.py
new/markdown-it-py-2.2.0/markdown_it/renderer.py
--- old/markdown-it-py-2.1.0/markdown_it/renderer.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/renderer.py 2023-02-22
06:52:12.000000000 +0100
@@ -18,7 +18,7 @@
try:
from typing import Protocol
except ImportError: # Python <3.8 doesn't have `Protocol` in the stdlib
- from typing_extensions import Protocol # type: ignore[misc]
+ from typing_extensions import Protocol # type: ignore
class RendererProtocol(Protocol):
@@ -82,10 +82,9 @@
result = ""
for i, token in enumerate(tokens):
-
if token.type == "inline":
- assert token.children is not None
- result += self.renderInline(token.children, options, env)
+ if token.children:
+ result += self.renderInline(token.children, options, env)
elif token.type in self.rules:
result += self.rules[token.type](tokens, i, options, env)
else:
@@ -207,8 +206,8 @@
if token.type == "text":
result += token.content
elif token.type == "image":
- assert token.children is not None
- result += self.renderInlineAsText(token.children, options, env)
+ if token.children:
+ result += self.renderInlineAsText(token.children, options,
env)
elif token.type == "softbreak":
result += "\n"
@@ -306,14 +305,10 @@
# "alt" attr MUST be set, even if empty. Because it's mandatory and
# should be placed on proper position for tests.
-
- assert (
- token.attrs and "alt" in token.attrs
- ), '"image" token\'s attrs must contain `alt`'
-
- # Replace content with actual value
-
- token.attrSet("alt", self.renderInlineAsText(token.children, options,
env))
+ if token.children:
+ token.attrSet("alt", self.renderInlineAsText(token.children,
options, env))
+ else:
+ token.attrSet("alt", "")
return self.renderToken(tokens, idx, options, env)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/blockquote.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/blockquote.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/blockquote.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/blockquote.py
2023-02-22 06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
def blockquote(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug(
"entering blockquote: %s, %s, %s, %s", state, startLine, endLine,
silent
)
@@ -129,7 +128,6 @@
# for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
nextLine = startLine + 1
while nextLine < endLine:
-
# check if it's outdented, i.e. it's inside list item and indented
# less than said list item:
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/rules_block/code.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/code.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/code.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/code.py 2023-02-22
06:52:12.000000000 +0100
@@ -7,7 +7,6 @@
def code(state: StateBlock, startLine: int, endLine: int, silent: bool =
False):
-
LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine,
silent)
if state.sCount[startLine] - state.blkIndent < 4:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/fence.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/fence.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/fence.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/fence.py 2023-02-22
06:52:12.000000000 +0100
@@ -7,7 +7,6 @@
def fence(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug("entering fence: %s, %s, %s, %s", state, startLine, endLine,
silent)
haveEndMarker = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/heading.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/heading.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/heading.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/heading.py 2023-02-22
06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
def heading(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug("entering heading: %s, %s, %s, %s", state, startLine,
endLine, silent)
pos = state.bMarks[startLine] + state.tShift[startLine]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/rules_block/hr.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/hr.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/hr.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/hr.py 2023-02-22
06:52:12.000000000 +0100
@@ -11,7 +11,6 @@
def hr(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug("entering hr: %s, %s, %s, %s", state, startLine, endLine,
silent)
pos = state.bMarks[startLine] + state.tShift[startLine]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/lheading.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/lheading.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/lheading.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/lheading.py
2023-02-22 06:52:12.000000000 +0100
@@ -8,7 +8,6 @@
def lheading(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug("entering lheading: %s, %s, %s, %s", state, startLine,
endLine, silent)
level = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/rules_block/list.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/list.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/list.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/list.py 2023-02-22
06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
# Search `[-+*][\n ]`, returns next pos after marker on success
# or -1 on fail.
def skipBulletListMarker(state: StateBlock, startLine: int):
-
pos = state.bMarks[startLine] + state.tShift[startLine]
maximum = state.eMarks[startLine]
@@ -33,7 +32,6 @@
# Search `\d+[.)][\n ]`, returns next pos after marker on success
# or -1 on fail.
def skipOrderedListMarker(state: StateBlock, startLine: int):
-
start = state.bMarks[startLine] + state.tShift[startLine]
pos = start
maximum = state.eMarks[startLine]
@@ -59,7 +57,6 @@
# /* 0 */ /* 9 */
if ch >= 0x30 and ch <= 0x39:
-
# List marker should have no more than 9 digits
# (prevents integer overflow in browsers)
if pos - start >= 10:
@@ -97,7 +94,6 @@
def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool):
-
LOGGER.debug("entering list: %s, %s, %s, %s", state, startLine, endLine,
silent)
isTerminatingParagraph = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/paragraph.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/paragraph.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/paragraph.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/paragraph.py
2023-02-22 06:52:12.000000000 +0100
@@ -8,7 +8,6 @@
def paragraph(state: StateBlock, startLine: int, endLine: int, silent: bool =
False):
-
LOGGER.debug(
"entering paragraph: %s, %s, %s, %s", state, startLine, endLine, silent
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/reference.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/reference.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/reference.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/reference.py
2023-02-22 06:52:12.000000000 +0100
@@ -7,7 +7,6 @@
def reference(state: StateBlock, startLine, _endLine, silent):
-
LOGGER.debug(
"entering reference: %s, %s, %s, %s", state, startLine, _endLine,
silent
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_block/state_block.py
new/markdown-it-py-2.2.0/markdown_it/rules_block/state_block.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_block/state_block.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_block/state_block.py
2023-02-22 06:52:12.000000000 +0100
@@ -19,7 +19,6 @@
tokens: list[Token],
srcCharCode: tuple[int, ...] | None = None,
):
-
if srcCharCode is not None:
self._src = src
self.srcCharCode = srcCharCode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/rules_core/block.py
new/markdown-it-py-2.2.0/markdown_it/rules_core/block.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_core/block.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_core/block.py 2023-02-22
06:52:12.000000000 +0100
@@ -3,7 +3,6 @@
def block(state: StateCore) -> None:
-
if state.inlineMode:
token = Token("inline", "", 0)
token.content = state.src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_core/normalize.py
new/markdown-it-py-2.2.0/markdown_it/rules_core/normalize.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_core/normalize.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_core/normalize.py
2023-02-22 06:52:12.000000000 +0100
@@ -9,7 +9,6 @@
def normalize(state: StateCore) -> None:
-
# Normalize newlines
string = NEWLINES_RE.sub("\n", state.src)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_core/replacements.py
new/markdown-it-py-2.2.0/markdown_it/rules_core/replacements.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_core/replacements.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_core/replacements.py
2023-02-22 06:52:12.000000000 +0100
@@ -116,7 +116,8 @@
for token in state.tokens:
if token.type != "inline":
continue
- assert token.children is not None
+ if token.children is None:
+ continue
if SCOPED_ABBR_RE.search(token.content):
replace_scoped(token.children)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_core/smartquotes.py
new/markdown-it-py-2.2.0/markdown_it/rules_core/smartquotes.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_core/smartquotes.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_core/smartquotes.py
2023-02-22 06:52:12.000000000 +0100
@@ -195,8 +195,7 @@
return
for token in state.tokens:
-
if token.type != "inline" or not QUOTE_RE.search(token.content):
continue
- assert token.children is not None
- process_inlines(token.children, state)
+ if token.children is not None:
+ process_inlines(token.children, state)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/autolink.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/autolink.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/autolink.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/autolink.py
2023-02-22 06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
def autolink(state: StateInline, silent: bool) -> bool:
-
pos = state.pos
if state.srcCharCode[pos] != 0x3C: # /* < */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/backticks.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/backticks.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/backticks.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/backticks.py
2023-02-22 06:52:12.000000000 +0100
@@ -7,7 +7,6 @@
def backtick(state: StateInline, silent: bool) -> bool:
-
pos = state.pos
ch = state.srcCharCode[pos]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/balance_pairs.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/balance_pairs.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/balance_pairs.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/balance_pairs.py
2023-02-22 06:52:12.000000000 +0100
@@ -4,7 +4,6 @@
def processDelimiters(state: StateInline, delimiters, *args):
-
openersBottom = {}
maximum = len(delimiters)
@@ -50,7 +49,6 @@
continue
if opener.open and opener.end < 0:
-
isOddMatch = False
# from spec:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/emphasis.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/emphasis.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/emphasis.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/emphasis.py
2023-02-22 06:52:12.000000000 +0100
@@ -39,7 +39,6 @@
def _postProcess(state, delimiters):
-
i = len(delimiters) - 1
while i >= 0:
startDelim = delimiters[i]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/entity.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/entity.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/entity.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/entity.py 2023-02-22
06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
def entity(state: StateInline, silent: bool):
-
pos = state.pos
maximum = state.posMax
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/html_inline.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/html_inline.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/html_inline.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/html_inline.py
2023-02-22 06:52:12.000000000 +0100
@@ -10,7 +10,6 @@
def html_inline(state: StateInline, silent: bool):
-
pos = state.pos
if not state.md.options.get("html", None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/image.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/image.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/image.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/image.py 2023-02-22
06:52:12.000000000 +0100
@@ -7,7 +7,6 @@
def image(state: StateInline, silent: bool):
-
label = None
href = ""
oldPos = state.pos
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/link.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/link.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/link.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/link.py 2023-02-22
06:52:12.000000000 +0100
@@ -5,7 +5,6 @@
def link(state: StateInline, silent: bool):
-
href = ""
title = ""
label = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/markdown_it/rules_inline/strikethrough.py
new/markdown-it-py-2.2.0/markdown_it/rules_inline/strikethrough.py
--- old/markdown-it-py-2.1.0/markdown_it/rules_inline/strikethrough.py
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/rules_inline/strikethrough.py
2023-02-22 06:52:12.000000000 +0100
@@ -53,7 +53,6 @@
def _postProcess(state: StateInline, delimiters: list[Delimiter]):
-
loneMarkers = []
maximum = len(delimiters)
@@ -89,7 +88,6 @@
state.tokens[endDelim.token - 1].type == "text"
and state.tokens[endDelim.token - 1].content == "~"
):
-
loneMarkers.append(endDelim.token - 1)
i += 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/markdown_it/token.py
new/markdown-it-py-2.2.0/markdown_it/token.py
--- old/markdown-it-py-2.1.0/markdown_it/token.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/markdown_it/token.py 2023-02-22
06:52:12.000000000 +0100
@@ -22,7 +22,6 @@
@dc.dataclass(**DATACLASS_KWARGS)
class Token:
-
type: str
"""Type of the token (string, e.g. "paragraph_open")"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/pyproject.toml
new/markdown-it-py-2.2.0/pyproject.toml
--- old/markdown-it-py-2.1.0/pyproject.toml 2022-04-16 15:51:17.000000000
+0200
+++ new/markdown-it-py-2.2.0/pyproject.toml 2023-02-22 06:52:12.000000000
+0100
@@ -35,15 +35,15 @@
Documentation = "https://markdown-it-py.readthedocs.io"
[project.optional-dependencies]
-code_style = ["pre-commit==2.6"]
+code_style = ["pre-commit~=3.0"]
compare = [
- "commonmark~=0.9.1",
- "markdown~=3.3.6",
- "mistletoe~=0.8.1",
- "mistune~=2.0.2",
- "panflute~=2.1.3",
+ "commonmark~=0.9",
+ "markdown~=3.4",
+ "mistletoe~=1.0",
+ "mistune~=2.0",
+ "panflute~=2.3",
]
-linkify = ["linkify-it-py~=1.0"]
+linkify = ["linkify-it-py>=1,<3"]
plugins = ["mdit-py-plugins"]
rtd = [
"attrs",
@@ -63,7 +63,7 @@
benchmarking = [
"psutil",
"pytest",
- "pytest-benchmark~=3.2",
+ "pytest-benchmark",
]
profiling = ["gprof2dot"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/markdown-it-py-2.1.0/tests/test_cli.py
new/markdown-it-py-2.2.0/tests/test_cli.py
--- old/markdown-it-py-2.1.0/tests/test_cli.py 2022-04-16 15:51:17.000000000
+0200
+++ new/markdown-it-py-2.2.0/tests/test_cli.py 2023-02-22 06:52:12.000000000
+0100
@@ -20,6 +20,13 @@
assert exc_info.value.code == 1
+def test_non_utf8():
+ with tempfile.TemporaryDirectory() as tempdir:
+ path = pathlib.Path(tempdir).joinpath("test.md")
+ path.write_bytes(b"\x80abc")
+ assert parse.main([str(path)]) == 0
+
+
def test_print_heading():
with patch("builtins.print") as patched:
parse.print_heading()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/tests/test_port/fixtures/issue-fixes.md
new/markdown-it-py-2.2.0/tests/test_port/fixtures/issue-fixes.md
--- old/markdown-it-py-2.1.0/tests/test_port/fixtures/issue-fixes.md
2022-04-16 15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/tests/test_port/fixtures/issue-fixes.md
2023-02-22 06:52:12.000000000 +0100
@@ -36,3 +36,12 @@
.
<p>ð¬</p>
.
+
+Fix CVE-2023-26303
+.
+![![]()
+]([)
+.
+<p><img src="%5B" alt="
+" /></p>
+.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/tests/test_port/test_fixtures.py
new/markdown-it-py-2.2.0/tests/test_port/test_fixtures.py
--- old/markdown-it-py-2.1.0/tests/test_port/test_fixtures.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/tests/test_port/test_fixtures.py 2023-02-22
06:52:12.000000000 +0100
@@ -111,4 +111,5 @@
def test_issue_fixes(line, title, input, expected):
md = MarkdownIt()
text = md.render(input)
+ print(text)
assert text.rstrip() == expected.rstrip()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/markdown-it-py-2.1.0/tests/test_port/test_references.py
new/markdown-it-py-2.2.0/tests/test_port/test_references.py
--- old/markdown-it-py-2.1.0/tests/test_port/test_references.py 2022-04-16
15:51:17.000000000 +0200
+++ new/markdown-it-py-2.2.0/tests/test_port/test_references.py 2023-02-22
06:52:12.000000000 +0100
@@ -2,7 +2,6 @@
def test_ref_definitions():
-
md = MarkdownIt()
src = "[a]: abc\n\n[b]: xyz\n\n[b]: ijk"
env = {}