Jira reader: mark divs created from panels with class "panel".
Closes: tarleb/jira-wiki-markup#2
This commit is contained in:
parent
a8aa301428
commit
00e8d0678e
2 changed files with 8 additions and 2 deletions
|
@ -71,10 +71,10 @@ toPandocCodeBlocks langMay params txt =
|
|||
Nothing -> []
|
||||
in codeBlockWith ("", classes, map paramToPair params) txt
|
||||
|
||||
-- | Create a pandoc @'Div'@
|
||||
-- | Create a pandoc @'Div'@ from a panel.
|
||||
toPandocDiv :: [Jira.Parameter] -> [Jira.Block] -> Blocks
|
||||
toPandocDiv params =
|
||||
divWith ("", [], map paramToPair params) . foldMap jiraToPandocBlocks
|
||||
divWith ("", ["panel"], map paramToPair params) . foldMap jiraToPandocBlocks
|
||||
|
||||
paramToPair :: Jira.Parameter -> (Text, Text)
|
||||
paramToPair (Jira.Parameter key value) = (key, value)
|
||||
|
|
|
@ -96,6 +96,12 @@ tests =
|
|||
simpleTable [para "Name"] [[para "Test"]]
|
||||
]
|
||||
|
||||
, testGroup "panel"
|
||||
[ "simple panel" =:
|
||||
"{panel}\nInterviewer: Jane Doe{panel}\n" =?>
|
||||
divWith ("", ["panel"], []) (para "Interviewer: Jane Doe")
|
||||
]
|
||||
|
||||
, testGroup "inlines"
|
||||
[ "emphasis" =:
|
||||
"*quid pro quo*" =?>
|
||||
|
|
Loading…
Reference in a new issue