From 96a01451efd487d0f6a91a2785fd28be001a92bf Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 12 Nov 2021 13:07:25 +0100 Subject: JATS writer: ensure figures are wrapped with `

` in list items. This prevents the generation of invalid output. --- test/Tests/Writers/JATS.hs | 48 +++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs index 5b96ed2ed..e605f55e1 100644 --- a/test/Tests/Writers/JATS.hs +++ b/test/Tests/Writers/JATS.hs @@ -61,21 +61,39 @@ tests = , "

" ]) ] - , "bullet list" =: bulletList [ plain $ text "first" - , plain $ text "second" - , plain $ text "third" - ] - =?> "\n\ - \ \n\ - \

first

\n\ - \
\n\ - \ \n\ - \

second

\n\ - \
\n\ - \ \n\ - \

third

\n\ - \
\n\ - \
" + , testGroup "bullet list" + [ "plain items" =: bulletList [ plain $ text "first" + , plain $ text "second" + , plain $ text "third" + ] + =?> "\n\ + \ \n\ + \

first

\n\ + \
\n\ + \ \n\ + \

second

\n\ + \
\n\ + \ \n\ + \

third

\n\ + \
\n\ + \
" + + , "item with implicit figure" =: + bulletList [ simpleFigure (text "caption") "a.png" "" ] =?> + T.unlines + [ "" + , " " + , "

" + , " " + , "

caption

" + , " + " xlink:href=\"a.png\" xlink:title=\"\" />" + , " " + , "

" + , "
" + , "
" + ] + ] , testGroup "definition lists" [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), [plain (text "hi there")])] =?> -- cgit v1.2.3