From ecea807397ac777cf208d90b64e04208b0631c8b Mon Sep 17 00:00:00 2001 From: Mauro Bieg Date: Fri, 21 Jun 2019 19:06:28 +0200 Subject: JATS Writer: do not emit empty (#5595) introduced by e87b54dcad5e37133bc0f4cfc8039e9fd0dd1b4e --- src/Text/Pandoc/Writers/JATS.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs index 145d37bee..61a68d543 100644 --- a/src/Text/Pandoc/Writers/JATS.hs +++ b/src/Text/Pandoc/Writers/JATS.hs @@ -88,7 +88,9 @@ docToJATS opts (Pandoc meta blocks) = do mapM (elementToJATS opts' startLvl) elements notes <- reverse . map snd <$> gets jatsNotes backs <- mapM (elementToJATS opts' startLvl) backElements - let fns = inTagsIndented "fn-group" $ vcat notes + let fns = if null notes + then mempty + else inTagsIndented "fn-group" $ vcat notes let back = render' $ vcat backs $$ fns let date = case getField "date" metadata -- an object `mplus` -- cgit v1.2.3