Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 9063113

Browse files
committed
⬆️ mdformat >= 0.3.2 (#2)
1 parent 8bd4129 commit 9063113

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
.vscode/

.vscode/settings.json

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

mdformat_tables/plugin.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ def _parse_cells(
1717
"""Convert tokens in each cell to strings."""
1818
for i, row in enumerate(rows):
1919
for j, cell_tokens in enumerate(row):
20-
rows[i][j] = renderer.render(
21-
[Token("paragraph_open", "p", 1)] + cell_tokens
22-
or [Token("text", "", 0)] + [Token("paragraph_close", "p", -1)],
23-
options,
24-
env,
25-
).rstrip()
20+
rows[i][j] = (
21+
renderer.render(
22+
[Token("paragraph_open", "p", 1)] + cell_tokens
23+
or [Token("text", "", 0)] + [Token("paragraph_close", "p", -1)],
24+
options,
25+
env,
26+
finalize=False,
27+
)
28+
.replace(MARKERS.BLOCK_SEPARATOR, "")
29+
.rstrip()
30+
)
2631
return rows
2732

2833

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.3.2"]
2121

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

tests/fixtures.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,20 @@ Nested tables in blockquotes:
8080
> | --- | --- |
8181
> | bar | baz |
8282
.
83+
84+
references
85+
.
86+
| [![a][b]][c] |
87+
| - |
88+
| [![a][b]][c] |
89+
90+
[b]: link1
91+
[c]: link2
92+
.
93+
| [![a][b]][c] |
94+
| ------------ |
95+
| [![a][b]][c] |
96+
97+
[b]: link1
98+
[c]: link2
99+
.

0 commit comments

Comments
 (0)