diff --git a/pandoc.cabal b/pandoc.cabal index c273c0c5b..b343cfa06 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -411,7 +411,7 @@ library blaze-html >= 0.9 && < 0.10, blaze-markup >= 0.8 && < 0.9, vector >= 0.10 && < 0.13, - jira-wiki-markup >= 1.0 && < 1.1, + jira-wiki-markup >= 1.1 && < 1.2, hslua >= 1.0.1 && < 1.1, hslua-module-system >= 0.2 && < 0.3, hslua-module-text >= 0.2 && < 0.3, diff --git a/src/Text/Pandoc/Readers/Jira.hs b/src/Text/Pandoc/Readers/Jira.hs index 46077a4a9..d79a996a8 100644 --- a/src/Text/Pandoc/Readers/Jira.hs +++ b/src/Text/Pandoc/Readers/Jira.hs @@ -121,6 +121,8 @@ jiraToPandocInlines :: Jira.Inline -> Inlines jiraToPandocInlines = \case Jira.Anchor t -> spanWith (t, [], []) mempty Jira.AutoLink url -> link (Jira.fromURL url) "" (str (Jira.fromURL url)) + Jira.ColorInline c ils -> spanWith ("", [], [("color", colorName c)]) $ + fromInlines ils Jira.Emoji icon -> str . iconUnicode $ icon Jira.Entity entity -> str . fromEntity $ entity Jira.Image _ url -> image (Jira.fromURL url) "" mempty diff --git a/stack.yaml b/stack.yaml index 5d9407a06..69e9ca1dc 100644 --- a/stack.yaml +++ b/stack.yaml @@ -20,7 +20,7 @@ extra-deps: - regex-pcre-builtin-0.95.0.8.8.35 - doclayout-0.3 - emojis-0.1 -- jira-wiki-markup-1.0.0 +- jira-wiki-markup-1.1.0 - HsYAML-0.2.0.0 - HsYAML-aeson-0.2.0.0 - doctemplates-0.8.1 diff --git a/test/Tests/Readers/Jira.hs b/test/Tests/Readers/Jira.hs index 220bd8069..0deec3865 100644 --- a/test/Tests/Readers/Jira.hs +++ b/test/Tests/Readers/Jira.hs @@ -96,6 +96,10 @@ tests = "HCO ~3~^-^" =?> para ("HCO " <> subscript "3" <> superscript "-") + , "color" =: + "This is {color:red}red{color}." =?> + para ("This is " <> spanWith ("", [], [("color", "red")]) "red" <> ".") + , "linebreak" =: "first\nsecond" =?> para ("first" <> linebreak <> "second")