Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove optional whitespace from short image markdown (#1290)
* Add vim temp files to gitignore * Remove optional whitespace from short image markdown
- Loading branch information
1 parent
8261457
commit f58fe88
Showing
4 changed files
with
31 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ pylint.txt | |
# IDEs | ||
.idea/ | ||
.vscode/ | ||
*.swp | ||
|
||
# Django stuff: | ||
*.log | ||
|
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 |
---|---|---|
@@ -1,7 +1,23 @@ | ||
import pytest | ||
|
||
from ..parser import parse | ||
|
||
|
||
def test_short_image_markdown(request_mock, user, snapshot): | ||
text = "!(http://somewhere.com/image.jpg)" | ||
@pytest.mark.parametrize( | ||
"text", | ||
[ | ||
pytest.param("!(http://somewhere.com/image.jpg)", id="base"), | ||
pytest.param("! (space)", id="space-one-word"), | ||
pytest.param("! (space with other words)", id="space-multiple-words"), | ||
pytest.param( | ||
"Text before exclamation mark!(http://somewhere.com/image.jpg)", | ||
id="text-before-mark", | ||
), | ||
pytest.param( | ||
"Text before with space in between! (sometext)", id="text-before-with-space" | ||
), | ||
], | ||
) | ||
def test_short_image_markdown(request_mock, user, snapshot, text): | ||
result = parse(text, request_mock, user, minify=False) | ||
snapshot.assert_match(result["parsed_text"]) |