forked from catcombo/jira2markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tables): change table header delimiter to triple hyphen
- Loading branch information
Showing
3 changed files
with
20 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,7 +170,7 @@ def test_mention(self, token, test_input, expected): | |
[ | ||
("blockquote", "{quote}%s{quote}", ["> %s", "> %s"]), | ||
("panel", "{panel}%s{panel}", ["> %s", "> %s"]), | ||
("table", "|%s\n|row", ["|%s|\n|-|\n|row|\n"]), | ||
("table", "|%s\n|row", ["|%s|\n|---|\n|row|\n"]), | ||
("unordered_list", "* %s", ["- %s", " %s"]), | ||
("ordered_list", "# %s", ["1. %s", " %s"]), | ||
], | ||
|
@@ -196,7 +196,7 @@ def test_table(self, token, test_input, expected): | |
if token == "table": | ||
pytest.skip(f"Skip nested tests for {token} token") | ||
else: | ||
assert convert(test_input % "|Table") == self.render_expected(expected, "|Table|\n|-|\n") | ||
assert convert(test_input % "|Table") == self.render_expected(expected, "|Table|\n|---|\n") | ||
|
||
def test_list(self, token, test_input, expected): | ||
if token in ["unordered_list", "ordered_list"]: | ||
|
@@ -254,21 +254,21 @@ class TestTableContent: | |
def test_basic_markup(self): | ||
assert ( | ||
convert("| Table *bold header* and {color:red}colored title{color} |") | ||
== '| Table **bold header** and <font color="red">colored title</font> |\n|-|\n' | ||
== '| Table **bold header** and <font color="red">colored title</font> |\n|---|\n' | ||
) | ||
|
||
def test_cell_image(self): | ||
assert convert("|!image.png|width=300!") == '|<img src="image.png" width="300" />|\n|-|\n' | ||
assert convert("|!image.png|width=300!") == '|<img src="image.png" width="300" />|\n|---|\n' | ||
|
||
def test_cell_link(self): | ||
assert convert("|[link|http://example.com]|") == "|[link](http://example.com)|\n|-|\n" | ||
assert convert("|[link|http://example.com]|") == "|[link](http://example.com)|\n|---|\n" | ||
|
||
def test_cell_mailto(self): | ||
assert convert("|[mailto:[email protected]]|") == "|<[email protected]>|\n|-|\n" | ||
assert convert("|[-alias-|mailto:[email protected]]|") == "|[~~alias~~](mailto:[email protected])|\n|-|\n" | ||
assert convert("|[mailto:[email protected]]|") == "|<[email protected]>|\n|---|\n" | ||
assert convert("|[-alias-|mailto:[email protected]]|") == "|[~~alias~~](mailto:[email protected])|\n|---|\n" | ||
|
||
def test_cell_mention(self): | ||
assert convert("|[user|~uuid]|", {"uuid": "elliot"}) == "|@elliot|\n|-|\n" | ||
assert convert("|[user|~uuid]|", {"uuid": "elliot"}) == "|@elliot|\n|---|\n" | ||
|
||
|
||
class TestPanelContent: | ||
|
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