Skip to content

Commit 683b104

Browse files
committed
fix(#49): pop FILLER_CHAR, which is causing the HTML rendering error
1 parent 9b61d6e commit 683b104

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

mdformat_mkdocs/_postprocess_inline.py

+2
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@ def postprocess_list_wrap(
7171
else:
7272
words.append(word)
7373
wrapped_length = next_length + 1
74+
if len(words) and words[-1] == FILLER_CHAR:
75+
words.pop()
7476
return WRAP_POINT.join(_w for _w in words if _w)
7577
return f"{filler}{WRAP_POINT}{text}" if filler else text

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ isolated_build = true
169169
requires = ["tox>=4.20.0"]
170170
skip_missing_interpreters = false
171171

172+
[tool.tox.env."py312-mdformat"]
173+
commands = [["mdformat", {default = [], extend = true, replace = "posargs"}]]
174+
description = "Run development extension with arbitrary mdformat args (e.g. `tox run -e py312-mdformat -- --wrap=80 tmp.md`)"
175+
172176
[tool.tox.env."py312-pre-commit"]
173177
commands = [["pre-commit", "run", "--all-files", {default = [], extend = true, replace = "posargs"}]]
174178
deps = "pre-commit>=4.0.1"

0 commit comments

Comments
 (0)