aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/JATS.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/JATS.hs')
-rw-r--r--src/Text/Pandoc/Readers/JATS.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs
index d7f87f695..d3d742de3 100644
--- a/src/Text/Pandoc/Readers/JATS.hs
+++ b/src/Text/Pandoc/Readers/JATS.hs
@@ -317,6 +317,7 @@ parseMetadata e = do
getTitle e
getAuthors e
getAffiliations e
+ getAbstract e
return mempty
getTitle :: PandocMonad m => Element -> JATS m ()
@@ -348,6 +349,14 @@ getAffiliations x = do
affs <- mapM getInlines $ filterChildren (named "aff") x
unless (null affs) $ addMeta "institute" affs
+getAbstract :: PandocMonad m => Element -> JATS m ()
+getAbstract e =
+ case filterElement (named "abstract") e of
+ Just s -> do
+ blks <- getBlocks s
+ addMeta "abstract" blks
+ Nothing -> pure ()
+
getContrib :: PandocMonad m => Element -> JATS m Inlines
getContrib x = do
given <- maybe (return mempty) getInlines