Skip to content

Commit bddc882

Browse files
authored
🗑 DEPRECATE: Move plugins to mdit_py_plugins (#93)
Plugins (in `markdown_it.extensions`) have now been moved to <https://github.com/executablebooks/mdit-py-plugins>. This will allow for their maintenance to occur on a different cycle to the core code, facilitating the release of a v1.0.0 for this package
1 parent 2eb1fe6 commit bddc882

Some content is hidden

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

52 files changed

+130
-2710
lines changed

.mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ warn_unused_ignores = True
33
warn_redundant_casts = True
44
no_implicit_optional = True
55
strict_equality = True
6+
7+
[mypy-tests.test_plugins.*]
8+
ignore_errors = True

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ include LICENSE
1919
include LICENSE.markdown-it
2020
include CHANGELOG.md
2121

22-
recursive-exclude markdown_it *.js
23-
recursive-include markdown_it port.yaml LICENSE README.md py.typed
22+
include markdown_it/py.typed
23+
include markdown_it/port.yaml

docs/plugins.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,48 @@ The following plugins are embedded within the core package (enabled when using t
77
- [tables](https://help.github.com/articles/organizing-information-with-tables/) (GFM)
88
- [strikethrough](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) (GFM)
99

10-
Other plugins are then available *via* the `markdown_it.extensions` package.
10+
Other plugins are then available *via* the [`mdit_py_plugins`](https://github.com/executablebooks/mdit-py-plugins).
11+
12+
```{important}
13+
``markdown_it.extensions`` is now deprecated and plugins have been moved to
14+
[`mdit_py_plugins`](https://github.com/executablebooks/mdit-py-plugins)
15+
```
16+
1117
They can be chained and loaded *via*:
1218

1319
```python
1420
from markdown_it import MarkdownIt
21+
from mdit_py_plugins import plugin1, plugin2
1522
md = MarkdownIt().use(plugin1, keyword=value).use(plugin2, keyword=value)
1623
html_string = md.render("some *Markdown*")
1724
```
1825

1926
```{eval-rst}
20-
.. autofunction:: markdown_it.extensions.anchors.anchors_plugin
27+
.. autofunction:: mdit_py_plugins.anchors.anchors_plugin
2128
:noindex:
2229
23-
.. autofunction:: markdown_it.extensions.footnote.footnote_plugin
30+
.. autofunction:: mdit_py_plugins.footnote.footnote_plugin
2431
:noindex:
2532
26-
.. autofunction:: markdown_it.extensions.front_matter.front_matter_plugin
33+
.. autofunction:: mdit_py_plugins.front_matter.front_matter_plugin
2734
:noindex:
2835
29-
.. autofunction:: markdown_it.extensions.container.container_plugin
36+
.. autofunction:: mdit_py_plugins.container.container_plugin
3037
:noindex:
3138
32-
.. autofunction:: markdown_it.extensions.deflist.deflist_plugin
39+
.. autofunction:: mdit_py_plugins.deflist.deflist_plugin
3340
:noindex:
3441
35-
.. autofunction:: markdown_it.extensions.texmath.texmath_plugin
42+
.. autofunction:: mdit_py_plugins.texmath.texmath_plugin
3643
:noindex:
3744
38-
.. autofunction:: markdown_it.extensions.dollarmath.dollarmath_plugin
45+
.. autofunction:: mdit_py_plugins.dollarmath.dollarmath_plugin
3946
:noindex:
4047
41-
.. autofunction:: markdown_it.extensions.amsmath.amsmath_plugin
48+
.. autofunction:: mdit_py_plugins.amsmath.amsmath_plugin
4249
:noindex:
4350
44-
.. autofunction:: markdown_it.extensions.tasklists.tasklists_plugin
51+
.. autofunction:: mdit_py_plugins.tasklists.tasklists_plugin
4552
:noindex:
4653
```
4754

markdown_it/extensions/amsmath.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from mdit_py_plugins.amsmath import * # noqa: F401,F403
2+
3+
import warnings
4+
5+
warnings.warn(
6+
"`markdown_it.extensions` is deprecated, import from `mdit_py_plugins` instead",
7+
DeprecationWarning,
8+
stacklevel=2,
9+
)

markdown_it/extensions/amsmath/__init__.py

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

markdown_it/extensions/anchors.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from mdit_py_plugins.anchors import * # noqa: F401,F403
2+
3+
import warnings
4+
5+
warnings.warn(
6+
"`markdown_it.extensions` is deprecated, import from `mdit_py_plugins` instead",
7+
DeprecationWarning,
8+
stacklevel=2,
9+
)

markdown_it/extensions/anchors/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

markdown_it/extensions/anchors/index.py

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

0 commit comments

Comments
 (0)