aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJoseph C. Sible <josephcsible@users.noreply.github.com>2020-03-29 01:47:24 -0400
committerGitHub <noreply@github.com>2020-03-28 22:47:24 -0700
commitc812ff7e897fcc43448b26e5ce53480eeb5a81f9 (patch)
tree8de98355a2b00126eb1e9b2ae4ff0e5417a4ce1a /src/Text/Pandoc/Readers
parent09a5a1f447b9994ac2b4f088e09f8f17effeb578 (diff)
downloadpandoc-c812ff7e897fcc43448b26e5ce53480eeb5a81f9.tar.gz
Simplify fixAuthors (#6223)
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs7
1 files changed, 1 insertions, 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