File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
mdformat_mkdocs/mdit_plugins Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1717 ut eros sed sapien ullamcorper consequat. Nunc ligula ante.
1818
1919 Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
20- Nam vulputate tincidunt fringilla.
20+ Vulputate tincidunt fringilla.
2121 Nullam dignissim ultrices urna non auctor.
2222```
2323
2828
2929from __future__ import annotations
3030
31+ import re
3132from typing import TYPE_CHECKING
3233
3334from markdown_it import MarkdownIt
@@ -106,6 +107,7 @@ def escape_deflist(
106107 context : RenderContext , # noqa: ARG001
107108) -> str :
108109 """Escape line starting ":" which would otherwise be parsed as a definition list."""
110+ pattern = re .compile (r"^[:~] " )
109111 return "\n " .join (
110- "\\ " + line if line . startswith ( ":" ) else line for line in text .split ("\n " )
112+ "\\ " + line if pattern . match ( line ) else line for line in text .split ("\n " )
111113 )
Original file line number Diff line number Diff line change 1+ Prevent regression with non-deflists: https://github.com/KyleKing/mdformat-mkdocs/issues/56
2+ .
3+ ::: my_lib.core
4+ .
5+ ::: my_lib.core
6+ .
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ def flatten(nested_list: list[list[T]]) -> list[T]:
2727 "pymd_abbreviations.md" ,
2828 "pymd_snippet.md" ,
2929 "python_markdown_attr_list.md" ,
30+ "regression.md" ,
3031 "text.md" ,
3132 )
3233 ],
You can’t perform that action at this time.
0 commit comments