Skip to content

Commit 60fd272

Browse files
authored
Fix #977: use Github flavoured markdown for converting comments (#987)
1 parent 7d958f4 commit 60fd272

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

jbi/jira/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def markdown_to_jira(markdown: str, max_length: int = 0) -> str:
1212
if max_length > 0 and len(markdown) > max_length:
1313
# Truncate on last word.
1414
markdown = markdown[:max_length].rsplit(maxsplit=1)[0]
15-
return pypandoc.convert_text(markdown, "jira", format="md").strip() # type: ignore
15+
return pypandoc.convert_text(markdown, "jira", format="gfm").strip() # type: ignore

tests/unit/jira/test_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ def test_markdown_to_jira():
1818
- numbered
1919
* list
2020
21+
List without newline:
22+
* one
23+
* two
24+
2125
this was `inline` value ``that`` is turned into ```monospace``` tag.
2226
2327
this sentence __has__ **bold** and _has_ *italic*.
@@ -38,6 +42,11 @@ def test_markdown_to_jira():
3842
** numbered
3943
* list
4044
45+
List without newline:
46+
47+
* one
48+
* two
49+
4150
this was {{inline}} value {{that}} is turned into {{monospace}} tag.
4251
4352
this sentence *has* *bold* and _has_ _italic_.

0 commit comments

Comments
 (0)