diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-11-12 13:07:25 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-11-12 13:29:08 +0100 |
commit | 96a01451efd487d0f6a91a2785fd28be001a92bf (patch) | |
tree | 9081ea6969d940caee736284005bf82eaa3b6804 /test/Tests | |
parent | da96e1ff40d359b43c5f0bf06a56f98fedcb8a68 (diff) | |
download | pandoc-96a01451efd487d0f6a91a2785fd28be001a92bf.tar.gz |
JATS writer: ensure figures are wrapped with `<p>` in list items.
This prevents the generation of invalid output.
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Writers/JATS.hs | 48 |
1 files changed, 33 insertions, 15 deletions
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 = , "</fn></p>" ]) ] - , "bullet list" =: bulletList [ plain $ text "first" - , plain $ text "second" - , plain $ text "third" - ] - =?> "<list list-type=\"bullet\">\n\ - \ <list-item>\n\ - \ <p>first</p>\n\ - \ </list-item>\n\ - \ <list-item>\n\ - \ <p>second</p>\n\ - \ </list-item>\n\ - \ <list-item>\n\ - \ <p>third</p>\n\ - \ </list-item>\n\ - \</list>" + , testGroup "bullet list" + [ "plain items" =: bulletList [ plain $ text "first" + , plain $ text "second" + , plain $ text "third" + ] + =?> "<list list-type=\"bullet\">\n\ + \ <list-item>\n\ + \ <p>first</p>\n\ + \ </list-item>\n\ + \ <list-item>\n\ + \ <p>second</p>\n\ + \ </list-item>\n\ + \ <list-item>\n\ + \ <p>third</p>\n\ + \ </list-item>\n\ + \</list>" + + , "item with implicit figure" =: + bulletList [ simpleFigure (text "caption") "a.png" "" ] =?> + T.unlines + [ "<list list-type=\"bullet\">" + , " <list-item>" + , " <p specific-use=\"wrapper\">" + , " <fig>" + , " <caption><p>caption</p></caption>" + , " <graphic mimetype=\"image\" mime-subtype=\"png\"" <> + " xlink:href=\"a.png\" xlink:title=\"\" />" + , " </fig>" + , " </p>" + , " </list-item>" + , "</list>" + ] + ] , testGroup "definition lists" [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), [plain (text "hi there")])] =?> |