diff options
author | Mauro Bieg <mb21@users.noreply.github.com> | 2019-06-21 19:06:28 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-06-21 19:06:28 +0200 |
commit | ecea807397ac777cf208d90b64e04208b0631c8b (patch) | |
tree | ea87d5dec641cf8b889bb46dc32779b24f8c3349 | |
parent | f0edf603641cc880002c239d4ecf258280a89e73 (diff) | |
download | pandoc-ecea807397ac777cf208d90b64e04208b0631c8b.tar.gz |
JATS Writer: do not emit empty <fn-group> (#5595)
introduced by e87b54dcad5e37133bc0f4cfc8039e9fd0dd1b4e
-rw-r--r-- | src/Text/Pandoc/Writers/JATS.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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` |