git.iko.soy/typeable/pandoc
on master help sign in
Use native Underline instead of Span in Jira
commitb1561d8e470a4b9ecc681d4749093fa14cb1bd37 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 22 Jun 2020, 17:55 (6 years ago) parent2532698
4 files changed+4−8
src/Text/Pandoc/Readers/Jira.hs+1−1 src/Text/Pandoc/Writers/Jira.hs+1−4 test/Tests/Readers/Jira.hs+1−1 test/Tests/Writers/Jira.hs+1−2
src/Text/Pandoc/Readers/Jira.hs+1−1
@@ -141,7 +141,7 @@ jiraToPandocInlines = \case
141141
142142 fromStyle = \case
143143 Jira.Emphasis -> emph
144− Jira.Insert -> spanWith ("", ["underline"], [])
144+ Jira.Insert -> underline
145145 Jira.Strikeout -> strikeout
146146 Jira.Strong -> strong
147147 Jira.Subscript -> subscript
src/Text/Pandoc/Writers/Jira.hs+1−4
@@ -290,10 +290,7 @@ quotedToJira qtype xs = do
290290spanToJira :: PandocMonad m
291291 => Attr -> [Inline]
292292 -> JiraConverter m [Jira.Inline]
293−spanToJira (_, classes, _) =
294− if "underline" `elem` classes
295− then styled Jira.Insert
296− else toJiraInlines
293+spanToJira (_, _classes, _) = toJiraInlines
297294
298295registerNotes :: PandocMonad m => [Block] -> JiraConverter m [Jira.Inline]
299296registerNotes contents = do
test/Tests/Readers/Jira.hs+1−1
@@ -172,7 +172,7 @@ tests =
172172
173173 , "inserted text" =:
174174 "+the new version+" =?>
175− para (spanWith ("", ["underline"], []) "the new version")
175+ para (underline "the new version")
176176
177177 , "HTML entity" =:
178178 "me &amp; you" =?> para "me & you"
test/Tests/Writers/Jira.hs+1−2
@@ -20,8 +20,7 @@ tests :: [TestTree]
2020tests =
2121 [ testGroup "inlines"
2222 [ "underlined text" =:
23− spanWith ("ignored", ["ignored", "underline"], [("foo", "bar")])
24− "underlined text" =?>
23+ underline "underlined text" =?>
2524 "+underlined text+"
2625
2726 , "image with attributes" =: