Skip to content

Commit ef87743

Browse files
committed
Merge remote-tracking branch 'upstream/master' into renderer-protocol
2 parents 71e6c38 + 13c5129 commit ef87743

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+99
-6133
lines changed

.github/workflows/benchmark.yml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,3 @@ jobs:
4646
commit-msg-append: "[ci skip]"
4747
one-chart-groups: packages,plugins
4848
fail-on-alert: false
49-
50-
benchmark-plugins:
51-
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v2
55-
56-
- name: Set up Python 3.8
57-
uses: actions/setup-python@v2
58-
with:
59-
python-version: 3.8
60-
61-
- name: Install tox
62-
run: |
63-
python -m pip install --upgrade pip
64-
pip install tox
65-
66-
- name: Run plugin benchmarks
67-
run: tox -e py38-bench-plugins -- --benchmark-min-rounds 20 --benchmark-json bench-plugins.json
68-
69-
# - name: Upload plugin data
70-
# uses: actions/upload-artifact@v2
71-
# with:
72-
# name: bench-plugins
73-
# path: bench-plugins.json
74-
# if-no-files-found: error
75-
76-
- name: Store benchmark result
77-
uses: chrisjsewell/github-action-benchmark@v2
78-
with:
79-
name: Parsing Benchmarks
80-
output-file-path: bench-plugins.json
81-
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869/highlight/false
82-
github-token: ${{ secrets.GITHUB_TOKEN }}
83-
auto-push: true
84-
commit-msg-append: "[ci skip]"
85-
one-chart-groups: packages,plugins
86-
# Show alert with commit comment on detecting possible performance regression
87-
alert-threshold: '200%'
88-
comment-on-alert: true
89-
fail-on-alert: false
90-
alert-comment-cc-users: '@chrisjsewell'

.github/workflows/tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
tags:
1010
- 'v*'
1111
pull_request:
12+
schedule:
13+
- cron: '0 0 * * 0' # every week
1214

1315
jobs:
1416

@@ -53,6 +55,29 @@ jobs:
5355
file: ./coverage.xml
5456
fail_ci_if_error: true
5557

58+
test-plugins:
59+
60+
runs-on: ubuntu-latest
61+
strategy:
62+
matrix:
63+
python-version: [3.8]
64+
steps:
65+
- uses: actions/checkout@v2
66+
- name: Set up Python ${{ matrix.python-version }}
67+
uses: actions/setup-python@v2
68+
with:
69+
python-version: ${{ matrix.python-version }}
70+
- name: Install markdown-it-py
71+
run: |
72+
python -m pip install --upgrade pip
73+
pip install .[testing]
74+
- name: clone and install mdit-py-plugins
75+
run: |
76+
git clone https://github.com/executablebooks/mdit-py-plugins.git
77+
pip install --no-deps -e mdit-py-plugins
78+
- name: Run pytest for unit tests of mdit-py-plugins
79+
run: cd mdit-py-plugins; pytest
80+
5681
benchmark:
5782

5883
runs-on: ubuntu-latest

.readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ python:
77
path: .
88
extra_requirements:
99
- linkify
10+
- plugins
1011
- rtd
1112

1213
sphinx:

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## 1.0.0b2 - 2021-04-25
4+
5+
‼️ BREAKING: Move `mdit-py-plugins` out of the core install requirements and into a `plugins` extra.
6+
7+
Synchronised code with the upstream Markdown-It `v12.0.6`:
8+
9+
- 🐛 FIX: Raise HTML blocks priority to resolve conflict with headings
10+
- 🐛 FIX: Newline not rendered in image alt attribute
11+
312
## 1.0.0b1 - 2021-03-31
413

514
[Full commit log](https://github.com/executablebooks/markdown-it-py/compare/v0.6.2...9ecda04)
@@ -8,7 +17,7 @@ This is the first beta release of the stable v1.x series.
817

918
There are four notable (and breaking) changes:
1019

11-
1. The code has been synchronised with the upstream Markdown-It v12.0.4.
20+
1. The code has been synchronised with the upstream Markdown-It `v12.0.4`.
1221
In particular, this update alters the parsing of tables to be consistent with the GFM specification: <https://github.github.com/gfm/#tables-extension->
1322
A number of parsing performance and validation improvements are also included.
1423
2. `Token.attrs` are now stored as dictionaries, rather than a list of lists.

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ conda install -c conda-forge markdown-it-py
3232
or
3333

3434
```bash
35-
pip install markdown-it-py
35+
pip install markdown-it-py[plugins]
36+
```
37+
38+
or with extras
39+
40+
```bash
41+
conda install -c conda-forge markdown-it-py linkify-it-py mdit-py-plugins
42+
pip install markdown-it-py[linkify,plugins]
3643
```
3744

3845
## Usage
3946

4047
### Python API Usage
48+
4149
Render markdown to HTML with markdown-it-py and a custom configuration
4250
with and without plugins and features:
4351

@@ -75,6 +83,7 @@ html_text = md.render(text)
7583
```
7684

7785
### Command-line Usage
86+
7887
Render markdown to HTML with markdown-it-py from the
7988
command-line:
8089

benchmarking/bench_plugins.py

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

markdown_it/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .main import MarkdownIt # noqa: F401
22

33

4-
__version__ = "1.0.0b1"
4+
__version__ = "1.0.0b2"

markdown_it/extensions/__init__.py

Whitespace-only changes.

markdown_it/extensions/amsmath.py

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

markdown_it/extensions/anchors.py

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

markdown_it/extensions/colon_fence.py

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

markdown_it/extensions/container.py

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

markdown_it/extensions/deflist.py

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

markdown_it/extensions/dollarmath.py

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

markdown_it/extensions/footnote.py

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

markdown_it/extensions/front_matter.py

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

markdown_it/extensions/myst_blocks.py

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

markdown_it/extensions/myst_role.py

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

markdown_it/extensions/tasklists.py

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

markdown_it/extensions/texmath.py

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

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.6
3+
commit: df4607f1d4d4be7fdc32e71c04109aea8cc373fa
4+
date: Apr 16, 2021
55
notes:
66
- Rename variables that use python built-in names, e.g.
77
- `max` -> `maximum`

markdown_it/renderer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ def renderInlineAsText(
212212
elif token.type == "image":
213213
assert token.children is not None
214214
result += self.renderInlineAsText(token.children, options, env)
215+
elif token.type == "softbreak":
216+
result += "\n"
215217

216218
return result
217219

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ project_urls =
3030
packages = find:
3131
install_requires =
3232
attrs>=19,<21
33-
mdit-py-plugins~=0.2.6
3433
typing_extensions>=3.7.4;python_version<'3.8'
3534
python_requires = ~=3.6
3635
include_package_data = True
@@ -51,6 +50,8 @@ compare =
5150
panflute~=1.12
5251
linkify =
5352
linkify-it-py~=1.0
53+
plugins =
54+
mdit-py-plugins
5455
rtd =
5556
myst-nb~=0.11.1
5657
pyyaml

0 commit comments

Comments
 (0)