Skip to content

Commit 834a0fe

Browse files
butler54chrisjsewellhukkinj1
authored
⬆️ UPGRADE: mdformat 0.5.x (#2)
Co-authored-by: Chris Sewell <[email protected]> Co-authored-by: Taneli Hukkinen <[email protected]>
1 parent 1f792c8 commit 834a0fe

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.pre-commit-test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ repos:
77
files: "tests/pre-commit-test.md"
88
types: [markdown]
99
language: system
10-
additional_dependencies:
11-
- mdformat-plugin

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ To run the pre-commit hook test:
4949
tox -e py37-hook
5050
```
5151

52+
### Required changes for a new plugin
53+
This demonstration is setup with a plugin named `plugin` there are a number of locations to change. At a top level for a plugin
54+
`foo` at least the following changes are required
55+
- Global find and replace `mdformat_plugin` to `mdformat_foo` including folder names.
56+
- Global find and replace `mdformat-plugin` to `mdformat-foo` including folder names.
57+
- `tests/test_fixtures.py`: `output = render_text(text, extensions={"plugin"})` becomes `output = render_text(text, extensions={"foo"})`
58+
- `pyproject.toml` in addition to the global find and replace: `plugin = "mdformat_plugin"` becomes `foo = "mdformat_foo"`
59+
60+
Do not forget to update authorship / maintainers in `pyproject.toml` as well.
5261
## Publish to PyPi
5362

5463
Either use flit directly:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ classifiers = [
1717
keywords = "mdformat,markdown,markdown-it"
1818

1919
requires-python=">=3.6"
20-
requires=["mdformat~=0.3.1"]
20+
requires=["mdformat >=0.5.3,<0.6.0"]
2121

2222
[tool.flit.metadata.requires-extra]
2323
test = [

tests/fixtures.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ another test
1111
.
1212
Some *markdown*
1313

14-
* a
15-
* b
16-
- c
14+
- a
15+
- b
16+
* c
1717
.
1818
Some *markdown*
1919

20-
* a
21-
* b
20+
- a
21+
- b
2222

23-
- c
23+
* c
2424
.

0 commit comments

Comments
 (0)