Skip to content

Commit 3aa0b9c

Browse files
authored
Merge branch 'master' into src-none
2 parents df8d0bb + 7d44103 commit 3aa0b9c

File tree

10 files changed

+122
-90
lines changed

10 files changed

+122
-90
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.mypy.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ repos:
4444
hooks:
4545
- id: mypy
4646
additional_dependencies: [attrs]
47+
48+
- repo: https://github.com/asottile/setup-cfg-fmt
49+
rev: v1.16.0
50+
hooks:
51+
- id: setup-cfg-fmt

markdown_it/parser_block.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
("hr", rules_block.hr, ["paragraph", "reference", "blockquote", "list"]),
2525
("list", rules_block.list_block, ["paragraph", "reference", "blockquote"]),
2626
("reference", rules_block.reference),
27+
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
2728
("heading", rules_block.heading, ["paragraph", "reference", "blockquote"]),
2829
("lheading", rules_block.lheading),
29-
("html_block", rules_block.html_block, ["paragraph", "reference", "blockquote"]),
3030
("paragraph", rules_block.paragraph),
3131
]
3232

markdown_it/port.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- package: markdown-it/markdown-it
2-
version: 12.0.4
3-
commit: cd5296f1e7de2b978526178631859c18bb9d9928
4-
date: Mar 27, 2021
2+
version: 12.0.5
3+
commit: 3740146fc9c92ea15fdc6a358137ec7b68f05f4b
4+
date: Apr 14, 2021
55
notes:
66
- Rename variables that use python built-in names, e.g.
77
- `max` -> `maximum`

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=46.4.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
[metadata]
2+
name = markdown_it_py
3+
version = attr: markdown_it.__version__
4+
description = Python port of markdown-it. Markdown parsing, done right!
5+
long_description = file: README.md
6+
long_description_content_type = text/markdown
7+
url = https://github.com/executablebooks/markdown-it-py
8+
author = Chris Sewell
9+
author_email = [email protected]
10+
license = MIT
11+
license_file = LICENSE
12+
classifiers =
13+
Development Status :: 3 - Alpha
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: MIT License
16+
Programming Language :: Python :: 3
17+
Programming Language :: Python :: 3.6
18+
Programming Language :: Python :: 3.7
19+
Programming Language :: Python :: 3.8
20+
Programming Language :: Python :: 3.9
21+
Programming Language :: Python :: Implementation :: CPython
22+
Programming Language :: Python :: Implementation :: PyPy
23+
Topic :: Software Development :: Libraries :: Python Modules
24+
Topic :: Text Processing :: Markup
25+
keywords = markdown lexer parser development
26+
project_urls =
27+
Documentation=https://markdown-it-py.readthedocs.io
28+
29+
[options]
30+
packages = find:
31+
install_requires =
32+
attrs>=19,<21
33+
mdit-py-plugins~=0.2.6
34+
python_requires = ~=3.6
35+
include_package_data = True
36+
zip_safe = False
37+
38+
[options.entry_points]
39+
console_scripts =
40+
markdown-it = markdown_it.cli.parse:main
41+
42+
[options.extras_require]
43+
code_style =
44+
pre-commit==2.6
45+
compare =
46+
commonmark~=0.9.1
47+
markdown~=3.2.2
48+
mistletoe-ebp~=0.10.0
49+
mistune~=0.8.4
50+
panflute~=1.12
51+
linkify =
52+
linkify-it-py~=1.0
53+
rtd =
54+
myst-nb~=0.11.1
55+
pyyaml
56+
sphinx>=2,<4
57+
sphinx-copybutton
58+
sphinx-panels~=0.4.0
59+
sphinx_book_theme
60+
testing =
61+
coverage
62+
psutil
63+
pytest>=3.6,<4
64+
pytest-benchmark~=3.2
65+
pytest-cov
66+
pytest-regressions
67+
68+
[options.packages.find]
69+
exclude =
70+
test*
71+
benchmarking
72+
73+
[mypy]
74+
show_error_codes = True
75+
warn_unused_ignores = True
76+
warn_redundant_casts = True
77+
no_implicit_optional = True
78+
strict_equality = True
79+
80+
[mypy-tests.test_plugins.*]
81+
ignore_errors = True
82+
83+
[flake8]
84+
max-line-length = 100
85+
extend-ignore = E203

setup.py

Lines changed: 5 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,6 @@
1-
# from importlib import import_module
2-
from os import path
3-
import re
4-
from setuptools import find_packages, setup
1+
# This file is needed for editable installs (`pip install -e .`).
2+
# Can be removed once the following is resolved
3+
# https://github.com/pypa/packaging-problems/issues/256
4+
from setuptools import setup
55

6-
7-
def get_version():
8-
text = open(path.join(path.dirname(__file__), "markdown_it", "__init__.py")).read()
9-
match = re.compile(r"^__version__\s*\=\s*[\"\']([^\s\'\"]+)", re.M).search(text)
10-
return match.group(1)
11-
12-
13-
setup(
14-
name="markdown-it-py",
15-
version=get_version(),
16-
description="Python port of markdown-it. Markdown parsing, done right!",
17-
long_description=open("README.md").read(),
18-
long_description_content_type="text/markdown",
19-
url="https://github.com/executablebooks/markdown-it-py",
20-
project_urls={"Documentation": "https://markdown-it-py.readthedocs.io"},
21-
author="Chris Sewell",
22-
author_email="[email protected]",
23-
license="MIT",
24-
packages=find_packages(exclude=["test*", "benchmarking"]),
25-
include_package_data=True,
26-
entry_points={"console_scripts": ["markdown-it = markdown_it.cli.parse:main"]},
27-
classifiers=[
28-
"Development Status :: 3 - Alpha",
29-
"Intended Audience :: Developers",
30-
"License :: OSI Approved :: MIT License",
31-
"Programming Language :: Python :: 3",
32-
"Programming Language :: Python :: 3.6",
33-
"Programming Language :: Python :: 3.7",
34-
"Programming Language :: Python :: 3.8",
35-
"Programming Language :: Python :: 3.9",
36-
"Programming Language :: Python :: Implementation :: CPython",
37-
"Programming Language :: Python :: Implementation :: PyPy",
38-
"Topic :: Software Development :: Libraries :: Python Modules",
39-
"Topic :: Text Processing :: Markup",
40-
],
41-
keywords="markdown lexer parser development",
42-
python_requires="~=3.6",
43-
install_requires=["attrs>=19,<21", "mdit-py-plugins~=0.2.6"],
44-
extras_require={
45-
"code_style": ["pre-commit==2.6"],
46-
"testing": [
47-
"coverage",
48-
"pytest>=3.6,<4",
49-
"pytest-cov",
50-
"pytest-regressions",
51-
"pytest-benchmark~=3.2",
52-
"psutil",
53-
],
54-
"rtd": [
55-
"myst-nb~=0.11.1",
56-
"sphinx_book_theme",
57-
"sphinx-panels~=0.4.0",
58-
"sphinx-copybutton",
59-
"sphinx>=2,<4",
60-
"pyyaml",
61-
],
62-
"compare": [
63-
"commonmark~=0.9.1",
64-
"markdown~=3.2.2",
65-
"mistune~=0.8.4",
66-
# "mistletoe~=0.7.2",
67-
"mistletoe-ebp~=0.10.0",
68-
"panflute~=1.12",
69-
],
70-
"linkify": ["linkify-it-py~=1.0"],
71-
},
72-
zip_safe=False,
73-
)
6+
setup()

tests/test_api/test_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def test_get_rules():
2222
"hr",
2323
"list",
2424
"reference",
25+
"html_block",
2526
"heading",
2627
"lheading",
27-
"html_block",
2828
"paragraph",
2929
],
3030
"inline": [
@@ -62,9 +62,9 @@ def test_load_presets():
6262
"hr",
6363
"list",
6464
"reference",
65+
"html_block",
6566
"heading",
6667
"lheading",
67-
"html_block",
6868
"paragraph",
6969
],
7070
"inline": [

tests/test_port/fixtures/commonmark_extras.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,3 +629,21 @@ baz</p>
629629
</blockquote>
630630
</blockquote>
631631
.
632+
633+
Issue #772. Header rule should not interfere with html tags.
634+
.
635+
<!--
636+
==
637+
-->
638+
639+
<pre>
640+
==
641+
</pre>
642+
.
643+
<!--
644+
==
645+
-->
646+
<pre>
647+
==
648+
</pre>
649+
.

0 commit comments

Comments
 (0)