From c812ff7e897fcc43448b26e5ce53480eeb5a81f9 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" <josephcsible@users.noreply.github.com> Date: Sun, 29 Mar 2020 01:47:24 -0400 Subject: [PATCH] Simplify fixAuthors (#6223) --- src/Text/Pandoc/Readers/Docx.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index 6b375a51c..e1a8066ba 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -192,12 +192,7 @@ bodyPartsToMeta bps = do return $ Meta mp' fixAuthors :: MetaValue -> MetaValue -fixAuthors (MetaBlocks blks) = - MetaList $ map g $ filter f blks - where f (Para _) = True - f _ = False - g (Para ils) = MetaInlines ils - g _ = MetaInlines [] +fixAuthors (MetaBlocks blks) = MetaList [MetaInlines ils | Para ils <- blks] fixAuthors mv = mv isInheritedFromStyles :: (Eq (StyleName s), HasStyleName s, HasParentStyle s) => [StyleName s] -> s -> Bool