Skip to content

Commit f22c565

Browse files
authored
Merge branch 'main' into di-patch-1
2 parents 24d0a73 + cb75c8a commit f22c565

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changes
22
=======
33

4+
30.0 (2021-09-30)
5+
-----------------
6+
7+
* support cmarkgfm>=0.6.0 (#209)
8+
49
29.0 (2021-02-22)
510
-----------------
611

readme_renderer/__about__.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,23 @@
1414
from __future__ import absolute_import, division, print_function
1515

1616
__all__ = [
17-
"__title__", "__summary__", "__uri__", "__version__", "__author__",
18-
"__email__", "__license__", "__copyright__",
17+
"__title__",
18+
"__summary__",
19+
"__uri__",
20+
"__version__",
21+
"__author__",
22+
"__email__",
23+
"__license__",
24+
"__copyright__",
1925
]
2026

2127
__title__ = "readme_renderer"
22-
__summary__ = ('readme_renderer is a library for rendering "readme" '
23-
'descriptions for Warehouse')
28+
__summary__ = (
29+
'readme_renderer is a library for rendering "readme" ' "descriptions for Warehouse"
30+
)
2431
__uri__ = "https://github.com/pypa/readme_renderer"
2532

26-
__version__ = "29.0"
33+
__version__ = "30.0"
2734

2835
__author__ = "The Python Packaging Authority"
2936
__email__ = "admin@mail.pypi.org"

readme_renderer/markdown.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def _highlight(html):
8888
formatter = pygments.formatters.HtmlFormatter(nowrap=True)
8989

9090
code_expr = re.compile(
91-
r'<pre><code class="language-(?P<lang>.+?)">(?P<code>.+?)'
91+
# cmarkgfm<0.6.0: <pre><code class="language-python">print('hello')</code></pre>
92+
# cmarkgfm>=0.6.0: <pre lang="python"><code>print('hello')</code></pre>
93+
r'(<pre>(?P<in_code><code) class="language-|<pre lang=")(?P<lang>[^"]+?)">'
94+
'(?(in_code)|<code>)(?P<code>.+?)'
9295
r'</code></pre>', re.DOTALL)
9396

9497
def replacer(match):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@
5959
entry_points={
6060
"distutils.commands": ["check = readme_renderer.integration.distutils:Check"],
6161
},
62-
extras_require={"md": "cmarkgfm>=0.5.0,<0.6.0"},
62+
extras_require={"md": "cmarkgfm>=0.5.0,<0.7.0"},
6363
packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
6464
)

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ commands =
99
extras = md
1010

1111
[testenv:pep8]
12-
basepython = python3.6
12+
basepython = python3
1313
deps =
1414
flake8
1515
pep8-naming
@@ -26,7 +26,7 @@ commands =
2626
python -m twine check dist/*
2727

2828
[testenv:noextra]
29-
basepython = python3.6
29+
basepython = python3
3030
extras =
3131

3232
[flake8]

0 commit comments

Comments
 (0)