@@ -119,7 +119,7 @@ description meta' = do
119119 let as = authors meta'
120120 dd <- docdate meta'
121121 annotation <- case lookupMeta "abstract" meta' of
122− Just (MetaBlocks bs) -> (list . el "annotation") <$> cMapM blockToXml bs
122+ Just (MetaBlocks bs) -> (list . el "annotation") <$> (cMapM blockToXml $ map unPlain bs)
123123 _ -> pure mempty
124124 let lang = case lookupMeta "lang" meta' of
125125 Just (MetaInlines [Str s]) -> [el "lang" $ iso639 s]
@@ -398,6 +398,11 @@ plainToPara (Para inlines : rest) =
398398 Para inlines : HorizontalRule : plainToPara rest -- HorizontalRule will be converted to <empty-line />
399399plainToPara (p:rest) = p : plainToPara rest
400400
401+-- Replace plain text with paragraphs
402+unPlain :: Block -> Block
403+unPlain (Plain inlines) = Para inlines
404+unPlain x = x
405+
401406-- Simulate increased indentation level. Will not really work
402407-- for multi-line paragraphs.
403408indentPrefix :: String -> Block -> Block