git.iko.soy/typeable/pandoc
on master help sign in
Jira reader: support colored inline text, indented lists

* Support for colored inlines has been added. * Lists are now allowed to be indented; i.e., lists are still recognized if list markers are preceded by spaces. Closes: #6183, #6184

commit7eb991484127a8c79b8db76743d2d63ee47e79ca authorAlbert Krewinkel <albert@zeitkraut.de> dateFri 13 Mar 2020, 09:43 (7 years ago) parent91f2bcf
4 files changed+8−2
pandoc.cabal+1−1 src/Text/Pandoc/Readers/Jira.hs+2 stack.yaml+1−1 test/Tests/Readers/Jira.hs+4
pandoc.cabal+1−1
@@ -411,7 +411,7 @@ library
411411 blaze-html >= 0.9 && < 0.10,
412412 blaze-markup >= 0.8 && < 0.9,
413413 vector >= 0.10 && < 0.13,
414− jira-wiki-markup >= 1.0 && < 1.1,
414+ jira-wiki-markup >= 1.1 && < 1.2,
415415 hslua >= 1.0.1 && < 1.1,
416416 hslua-module-system >= 0.2 && < 0.3,
417417 hslua-module-text >= 0.2 && < 0.3,
src/Text/Pandoc/Readers/Jira.hs+2
@@ -121,6 +121,8 @@ jiraToPandocInlines :: Jira.Inline -> Inlines
121121jiraToPandocInlines = \case
122122 Jira.Anchor t -> spanWith (t, [], []) mempty
123123 Jira.AutoLink url -> link (Jira.fromURL url) "" (str (Jira.fromURL url))
124+ Jira.ColorInline c ils -> spanWith ("", [], [("color", colorName c)]) $
125+ fromInlines ils
124126 Jira.Emoji icon -> str . iconUnicode $ icon
125127 Jira.Entity entity -> str . fromEntity $ entity
126128 Jira.Image _ url -> image (Jira.fromURL url) "" mempty
stack.yaml+1−1
@@ -20,7 +20,7 @@ extra-deps:
2020- regex-pcre-builtin-0.95.0.8.8.35
2121- doclayout-0.3
2222- emojis-0.1
23−- jira-wiki-markup-1.0.0
23+- jira-wiki-markup-1.1.0
2424- HsYAML-0.2.0.0
2525- HsYAML-aeson-0.2.0.0
2626- doctemplates-0.8.1
test/Tests/Readers/Jira.hs+4
@@ -96,6 +96,10 @@ tests =
9696 "HCO ~3~^-^" =?>
9797 para ("HCO " <> subscript "3" <> superscript "-")
9898
99+ , "color" =:
100+ "This is {color:red}red{color}." =?>
101+ para ("This is " <> spanWith ("", [], [("color", "red")]) "red" <> ".")
102+
99103 , "linebreak" =:
100104 "first\nsecond" =?>
101105 para ("first" <> linebreak <> "second")