git.iko.soy/typeable/pandoc
on master help sign in
Jira reader: resolve parsing issues of blockquote, color

Parsing problems occurring with block quotes and colored text have been resolved. Fixes: #6233 Fixes: #6235

commitd867cac8caa0171fcd32589a6827a69826c1b087 authorAlbert Krewinkel <albert@zeitkraut.de> dateFri 3 Apr 2020, 13:18 (7 years ago) parent792f1a6
3 files changed+22−3
pandoc.cabal+1−1 test/Tests/Readers/Jira.hs+16−2 test/Tests/Writers/Jira.hs+5
pandoc.cabal+1−1
@@ -412,7 +412,7 @@ library
412412 blaze-html >= 0.9 && < 0.10,
413413 blaze-markup >= 0.8 && < 0.9,
414414 vector >= 0.10 && < 0.13,
415− jira-wiki-markup >= 1.2.0 && < 1.3,
415+ jira-wiki-markup >= 1.2.1 && < 1.3,
416416 hslua >= 1.0.1 && < 1.2,
417417 hslua-module-system >= 0.2 && < 0.3,
418418 hslua-module-text >= 0.2 && < 0.3,
test/Tests/Readers/Jira.hs+16−2
@@ -14,8 +14,8 @@ Tests for the RST reader.
1414-}
1515module Tests.Readers.Jira (tests) where
1616
17−import Prelude
18−import Data.Text (Text)
17+import Prelude hiding (unlines)
18+import Data.Text (Text, unlines)
1919import Test.Tasty (TestTree, testGroup)
2020import Tests.Helpers (ToString, purely, test, (=?>))
2121import Text.Pandoc (def)
@@ -57,6 +57,16 @@ tests =
5757 [ "simple block quote" =:
5858 "bq. _Don't_ quote me on this." =?>
5959 blockQuote (para $ emph "Don't" <> space <> "quote me on this.")
60+
61+ , "block quote between paragraphs" =:
62+ unlines [ "Regular text."
63+ , "bq.This is a blockquote"
64+ , "More text."
65+ ] =?>
66+ mconcat [ para "Regular text."
67+ , blockQuote (para "This is a blockquote")
68+ , para "More text."
69+ ]
6070 ]
6171
6272 , testGroup "table"
@@ -105,6 +115,10 @@ tests =
105115 "This is {color:red}red{color}." =?>
106116 para ("This is " <> spanWith ("", [], [("color", "red")]) "red" <> ".")
107117
118+ , "hexcolor" =:
119+ "{color:#00875A}green{color}" =?>
120+ para (spanWith ("", [], [("color", "#00875A")]) "green")
121+
108122 , "linebreak" =:
109123 "first\nsecond" =?>
110124 para ("first" <> linebreak <> "second")
test/Tests/Writers/Jira.hs+5
@@ -23,5 +23,10 @@ tests =
2323 spanWith ("ignored", ["ignored", "underline"], [("foo", "bar")])
2424 "underlined text" =?>
2525 "+underlined text+"
26+
27+ , "image with attributes" =:
28+ imageWith ("", [], [("align", "right"), ("height", "50")])
29+ "image.png" "" mempty =?>
30+ "!image.png|align=right, height=50!"
2631 ]
2732 ]