Skip to content

Commit 6f3edf0

Browse files
committed
fix: handle wrapping without filtering all lines with {:
1 parent 14cfae4 commit 6f3edf0

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

mdformat_mkdocs/_postprocess_inline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def postprocess_list_wrap(
4141
and node.parent.parent
4242
and node.parent.parent.type != "list_item"
4343
)
44-
or "{:" in text # Prevent wrapping when attribute list is present
4544
):
4645
return text
4746

tests/format/fixtures/text.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,19 @@ Don't wrap long URLs (fixes: https://github.com/KyleKing/mdformat-mkdocs/issues/
17191719
.
17201720
- a https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols
17211721
- b
1722+
- a <https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols>
1723+
- b
1724+
- a [long-text](https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols)
1725+
- b
1726+
- a [with space](https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols)
1727+
- b
17221728
.
17231729
- a https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols
17241730
- b
1731+
- a <https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols>
1732+
- b
1733+
- a [long-text](https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols)
1734+
- b
1735+
- a [with space](https://github.com/python/mypy/blob/a3ce6d5307e99a1b6c181eaa7c5cf134c53b7d/test-data/check-protocols)
1736+
- b
17251737
.

0 commit comments

Comments
 (0)