diff options
author | Joseph C. Sible <josephcsible@users.noreply.github.com> | 2020-02-05 20:22:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 17:22:53 -0800 |
commit | 30c8980883921e0672c36db2ad77ab31c147190c (patch) | |
tree | e9dd01b0851f125071cc530bddcc2c989b18a1b3 /src/Text/Pandoc/Readers/Odt/Generic | |
parent | 9c12024e072ea24f05e98f21dacaf1833a58c2e8 (diff) | |
download | pandoc-30c8980883921e0672c36db2ad77ab31c147190c.tar.gz |
Simplify an overcomplicated filtering function (#6115)
There's no need to use `catMaybes`, `uncurry`, `bool`, etc., just
to get elements where the second element of a tuple is True.
Diffstat (limited to 'src/Text/Pandoc/Readers/Odt/Generic')
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs index 796026843..6949da9d8 100644 --- a/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs +++ b/src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs @@ -390,7 +390,7 @@ filterChildrenName' :: (NameSpaceID nsID) filterChildrenName' nsID f = getCurrentElement >>> arr XML.elChildren >>> iterateS (keepingTheValue (elemNameMatches nsID f)) - >>> arr (catMaybes . fmap (uncurry $ bool Nothing . Just)) + >>> arr (map fst . filter snd) -------------------------------------------------------------------------------- -- Attributes |