git.iko.soy/typeable/pandoc
on master help sign in
Simplify fixAuthors (#6223)
commitc812ff7e897fcc43448b26e5ce53480eeb5a81f9 authorJoseph C. Sible <josephcsible@users.noreply.github.com> dateSun 29 Mar 2020, 01:47 (7 years ago) parent09a5a1f
1 file changed+1−6
src/Text/Pandoc/Readers/Docx.hs+1−6
src/Text/Pandoc/Readers/Docx.hs+1−6
@@ -192,12 +192,7 @@ bodyPartsToMeta bps = do
192192 return $ Meta mp'
193193
194194fixAuthors :: MetaValue -> MetaValue
195−fixAuthors (MetaBlocks blks) =
196− MetaList $ map g $ filter f blks
197− where f (Para _) = True
198− f _ = False
199− g (Para ils) = MetaInlines ils
200− g _ = MetaInlines []
195+fixAuthors (MetaBlocks blks) = MetaList [MetaInlines ils | Para ils <- blks]
201196fixAuthors mv = mv
202197
203198isInheritedFromStyles :: (Eq (StyleName s), HasStyleName s, HasParentStyle s) => [StyleName s] -> s -> Bool