generated from executablebooks/mdformat-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(#4): demo passing the CLI option
- Loading branch information
Showing
3 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import mdformat | ||
|
||
|
||
def test_align_semantic_breaks_in_numbered_lists(): | ||
"""For https://github.com/KyleKing/mdformat-mkdocs/issues/4.""" | ||
input_text = """\ | ||
1. Here indent width is | ||
three. | ||
2. Here indent width is | ||
three. | ||
123. Here indent width is | ||
five. It needs to be so, because | ||
Otherwise this next paragraph doesn't belong in the same list item. | ||
""" | ||
expected_output = """\ | ||
1. Here indent width is | ||
three. | ||
1. Here indent width is | ||
three. | ||
1. Here indent width is | ||
five. It needs to be so, because | ||
Otherwise this next paragraph doesn't belong in the same list item. | ||
""" | ||
|
||
output = mdformat.text( | ||
input_text, | ||
options={"align_semantic_breaks_in_numbered_lists": True}, | ||
extensions={"mkdocs"}, | ||
) | ||
|
||
assert output == expected_output |