git.iko.soy/typeable/pandoc
on master help sign in
Simplify fixAuthors (#6223)
c812ff7Joseph C. Sible
src/Text/Pandoc/Readers/Docx.hs+1−6
@@ -192,12 +192,7 @@ bodyPartsToMeta bps = do
192 return $ Meta mp'
192 return $ Meta mp'
193
193
194fixAuthors :: MetaValue -> MetaValue
194fixAuthors :: MetaValue -> MetaValue
195−fixAuthors (MetaBlocks blks) =
195+fixAuthors (MetaBlocks blks) = MetaList [MetaInlines ils | Para ils <- 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 []
201fixAuthors mv = mv
196fixAuthors mv = mv
202
197
203isInheritedFromStyles :: (Eq (StyleName s), HasStyleName s, HasParentStyle s) => [StyleName s] -> s -> Bool
198isInheritedFromStyles :: (Eq (StyleName s), HasStyleName s, HasParentStyle s) => [StyleName s] -> s -> Bool