diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-06-22 17:55:14 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-06-22 17:55:57 -0700 |
commit | b1561d8e470a4b9ecc681d4749093fa14cb1bd37 (patch) | |
tree | 8cb2e08c80c99f8d3a2b45cb20fb79a4c12106ab | |
parent | 25326986dbb802692fd431f6c6627fde3604ccb7 (diff) | |
download | pandoc-b1561d8e470a4b9ecc681d4749093fa14cb1bd37.tar.gz |
Use native Underline instead of Span in Jira
-rw-r--r-- | src/Text/Pandoc/Readers/Jira.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Jira.hs | 5 | ||||
-rw-r--r-- | test/Tests/Readers/Jira.hs | 2 | ||||
-rw-r--r-- | test/Tests/Writers/Jira.hs | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Jira.hs b/src/Text/Pandoc/Readers/Jira.hs index fd96cbc4d..9266ce10d 100644 --- a/src/Text/Pandoc/Readers/Jira.hs +++ b/src/Text/Pandoc/Readers/Jira.hs @@ -141,7 +141,7 @@ jiraToPandocInlines = \case fromStyle = \case Jira.Emphasis -> emph - Jira.Insert -> spanWith ("", ["underline"], []) + Jira.Insert -> underline Jira.Strikeout -> strikeout Jira.Strong -> strong Jira.Subscript -> subscript diff --git a/src/Text/Pandoc/Writers/Jira.hs b/src/Text/Pandoc/Writers/Jira.hs index 29f260b5c..12348f62b 100644 --- a/src/Text/Pandoc/Writers/Jira.hs +++ b/src/Text/Pandoc/Writers/Jira.hs @@ -290,10 +290,7 @@ quotedToJira qtype xs = do spanToJira :: PandocMonad m => Attr -> [Inline] -> JiraConverter m [Jira.Inline] -spanToJira (_, classes, _) = - if "underline" `elem` classes - then styled Jira.Insert - else toJiraInlines +spanToJira (_, _classes, _) = toJiraInlines registerNotes :: PandocMonad m => [Block] -> JiraConverter m [Jira.Inline] registerNotes contents = do diff --git a/test/Tests/Readers/Jira.hs b/test/Tests/Readers/Jira.hs index 30f55585b..32b8ecb7c 100644 --- a/test/Tests/Readers/Jira.hs +++ b/test/Tests/Readers/Jira.hs @@ -172,7 +172,7 @@ tests = , "inserted text" =: "+the new version+" =?> - para (spanWith ("", ["underline"], []) "the new version") + para (underline "the new version") , "HTML entity" =: "me & you" =?> para "me & you" diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index 57ed27360..93d830c94 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -20,8 +20,7 @@ tests :: [TestTree] tests = [ testGroup "inlines" [ "underlined text" =: - spanWith ("ignored", ["ignored", "underline"], [("foo", "bar")]) - "underlined text" =?> + underline "underlined text" =?> "+underlined text+" , "image with attributes" =: |