Docx writer: add MetaString case for abstract, subtitle (#4905)

fixes #4900
This commit is contained in:
Mauro Bieg 2018-09-15 20:55:23 +02:00 committed by John MacFarlane
parent f6d8df2c76
commit f736dea4ba

View file

@ -763,11 +763,13 @@ writeOpenXML opts (Pandoc meta blocks) = do
let abstract' = case lookupMeta "abstract" meta of
Just (MetaBlocks bs) -> bs
Just (MetaInlines ils) -> [Plain ils]
Just (MetaString s) -> [Plain [Str s]]
_ -> []
let subtitle' = case lookupMeta "subtitle" meta of
Just (MetaBlocks [Plain xs]) -> xs
Just (MetaBlocks [Para xs]) -> xs
Just (MetaInlines xs) -> xs
Just (MetaString s) -> [Str s]
_ -> []
let includeTOC = writerTableOfContents opts ||
case lookupMeta "toc" meta of