Simplify fixAuthors (#6223)

This commit is contained in:
Joseph C. Sible 2020-03-29 01:47:24 -04:00 committed by GitHub
parent 09a5a1f447
commit c812ff7e89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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