diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-12-19 20:20:06 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-12-19 20:20:06 -0800 |
commit | 3c4aa01664486701a531b0db29dd2bb5124965ee (patch) | |
tree | 29604431cacebc592b57bfb5de02213ecea56b2d /src/Text/Pandoc/Shared.hs | |
parent | 8053ba2123699fd89900b2a9c5656a72d3a2fe85 (diff) | |
parent | 3d70059a4896c66cab59832a3ed9eb8334b84a2f (diff) | |
download | pandoc-3c4aa01664486701a531b0db29dd2bb5124965ee.tar.gz |
Merge pull request #1099 from hdevalence/master
Minor HLint-suggested changes
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index ce71881e6..3446f4343 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -532,7 +532,7 @@ headerShift n = walk shift -- | Detect if a list is tight. isTightList :: [[Block]] -> Bool -isTightList = and . map firstIsPlain +isTightList = all firstIsPlain where firstIsPlain (Plain _ : _) = True firstIsPlain _ = False @@ -564,14 +564,10 @@ makeMeta title authors date = -- | Render HTML tags. renderTags' :: [Tag String] -> String renderTags' = renderTagsOptions - renderOptions{ optMinimize = \x -> - let y = map toLower x - in y == "hr" || y == "br" || - y == "img" || y == "meta" || - y == "link" - , optRawTag = \x -> - let y = map toLower x - in y == "script" || y == "style" } + renderOptions{ optMinimize = matchTags ["hr", "br", "img", + "meta", "link"] + , optRawTag = matchTags ["script", "style"] } + where matchTags = \tags -> flip elem tags . map toLower -- -- File handling |