Skip to content

Commit 487b64a

Browse files
committed
⬆️ UPGRADE: Replace mdformat-frontmatter with mdformat-frontmatter (executablebooks#46)
Closes executablebooks#45
1 parent 78cf93e commit 487b64a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mdformat_myst/plugin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ def update_mdit(mdit: MarkdownIt) -> None:
2323
mdit.options["parser_extension"].append(tables_plugin)
2424
tables_plugin.update_mdit(mdit)
2525

26-
# Enable mdformat-frontmatter plugin
27-
frontmatter_plugin = mdformat.plugins.PARSER_EXTENSIONS["frontmatter"]
28-
if frontmatter_plugin not in mdit.options["parser_extension"]:
29-
mdit.options["parser_extension"].append(frontmatter_plugin)
30-
frontmatter_plugin.update_mdit(mdit)
26+
# Enable mdformat-front-matters plugin
27+
front_matters_plugin = mdformat.plugins.PARSER_EXTENSIONS["front_matters"]
28+
if front_matters_plugin not in mdit.options["parser_extension"]:
29+
mdit.options["parser_extension"].append(front_matters_plugin)
30+
front_matters_plugin.update_mdit(mdit)
3131

3232
# Enable mdformat-footnote plugin
3333
footnote_plugin = mdformat.plugins.PARSER_EXTENSIONS["footnote"]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ requires=[
2323
"mdformat >=0.7.0",
2424
"mdit-py-plugins >=0.3.0",
2525
"mdformat-tables >=0.4.0; python_version < '3.10'",
26-
"mdformat-frontmatter >=0.3.2",
26+
"mdformat-front-matters >= 0.1.0",
2727
"mdformat-footnote >=0.1.1",
2828
"mdformat-gfm >=1.0.0; python_version >= '3.10'",
2929
"ruamel.yaml >=0.16.0",

tests/data/fixtures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ firstname: Dorothy
299299
Thats YAML front matter^
300300
.
301301
---
302-
lastname: Blorothy
303302
firstname: Dorothy
303+
lastname: Blorothy
304304
---
305305
306306
Thats YAML front matter^

0 commit comments

Comments
 (0)