aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-11-12 13:07:25 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-11-12 13:29:08 +0100
commit96a01451efd487d0f6a91a2785fd28be001a92bf (patch)
tree9081ea6969d940caee736284005bf82eaa3b6804 /src
parentda96e1ff40d359b43c5f0bf06a56f98fedcb8a68 (diff)
downloadpandoc-96a01451efd487d0f6a91a2785fd28be001a92bf.tar.gz
JATS writer: ensure figures are wrapped with `<p>` in list items.
This prevents the generation of invalid output.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/JATS.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs
index d58da8bd2..799fe29fa 100644
--- a/src/Text/Pandoc/Writers/JATS.hs
+++ b/src/Text/Pandoc/Writers/JATS.hs
@@ -551,6 +551,7 @@ inlineToJATS _ (Image (ident,_,kvs) _ (src, tit)) = do
return $ selfClosingTag "inline-graphic" attr
isParaOrList :: Block -> Bool
+isParaOrList SimpleFigure{} = False -- implicit figures are not paragraphs
isParaOrList Para{} = True
isParaOrList Plain{} = True
isParaOrList BulletList{} = True