Skip to content

Commit 6411901

Browse files
authored
⬆️ Replace mdformat-frontmatter with mdformat-front-matters (#46)
1 parent 1bfcdf6 commit 6411901

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
27-
python-version: ['3.9', '3.13', '3.14-dev']
27+
python-version: ['3.10', '3.13', '3.14', '3.15-dev']
2828
os: [ubuntu-latest, macos-latest, windows-latest]
29-
continue-on-error: ${{ matrix.python-version == '3.14-dev' }}
29+
continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
3030

3131
steps:
3232
- uses: actions/checkout@v4
@@ -49,7 +49,7 @@ jobs:
4949
5050
# FYI: Requires token to continue usage
5151
# - name: Upload to Codecov
52-
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
52+
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
5353
# uses: codecov/codecov-action@v1
5454
# with:
5555
# name: pytests
@@ -65,7 +65,7 @@ jobs:
6565
- name: Set up Python
6666
uses: actions/setup-python@v2
6767
with:
68-
python-version: 3.9
68+
python-version: '3.10'
6969

7070
- name: Installation (deps and package)
7171
run: |
@@ -87,7 +87,7 @@ jobs:
8787
- name: Set up Python
8888
uses: actions/setup-python@v5
8989
with:
90-
python-version: 3.9
90+
python-version: '3.10'
9191
- name: install flit
9292
run: |
9393
pip install flit~=3.0

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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ classifiers = [
1818
]
1919
keywords = "mdformat,markdown,formatter,gfm"
2020

21-
requires-python=">=3.9"
22-
requires=[
21+
requires-python = ">=3.10"
22+
requires = [
2323
"mdformat >=0.7.0",
2424
"mdit-py-plugins >=0.3.0",
25-
"mdformat-tables >=0.4.0; python_version < '3.10'",
26-
"mdformat-frontmatter >=0.3.2",
25+
"mdformat-front-matters >= 1.0.0",
2726
"mdformat-footnote >=0.1.1",
28-
"mdformat-gfm >=1.0.0; python_version >= '3.10'",
27+
"mdformat-gfm >=1.0.0",
2928
"ruamel.yaml >=0.16.0",
3029
]
3130

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tox]
2-
envlist = py39
2+
envlist = py310
33
isolated_build = True
44

5-
[testenv:py{39,311,313}]
5+
[testenv:py{310,314,315}]
66
extras = test
77
deps =
88
black
99
flake8
1010
commands = pytest {posargs}
1111

12-
[testenv:py{39,311,313}-hook]
12+
[testenv:py{310,314,315}-hook]
1313
commands = pre-commit run --config .pre-commit-test.yaml {posargs:--all-files --verbose --show-diff-on-failure}
1414

1515
[flake8]

0 commit comments

Comments
 (0)