diff options
author | Henry de Valence <hdevalence@hdevalence.ca> | 2013-12-19 20:19:24 -0500 |
---|---|---|
committer | Henry de Valence <hdevalence@hdevalence.ca> | 2013-12-19 20:19:24 -0500 |
commit | 0c5e7cf8cb4fe6959d7e89880e8925afe6625414 (patch) | |
tree | 701879f6278cab45e0a56fcef0074e0523fb6a2f /src/Text/Pandoc/Readers/Markdown.hs | |
parent | 1ed2c467c9442934c060257f6e191a5a3d6c1e38 (diff) |
HLint: use `elem` and `notElem`
Replaces long conditional chains with calls to `elem` and `notElem`.
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index b2e88d47e..f483ab059 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -789,8 +789,8 @@ listItem start = try $ do orderedList :: MarkdownParser (F Blocks) orderedList = try $ do (start, style, delim) <- lookAhead anyOrderedListStart - unless ((style == DefaultStyle || style == Decimal || style == Example) && - (delim == DefaultDelim || delim == Period)) $ + unless (style `elem` [DefaultStyle, Decimal, Example] && + delim `elem` [DefaultDelim, Period]) $ guardEnabled Ext_fancy_lists when (style == Example) $ guardEnabled Ext_example_lists items <- fmap sequence $ many1 $ listItem @@ -925,8 +925,8 @@ strictHtmlBlock = htmlInBalanced (not . isInlineTag) rawVerbatimBlock :: MarkdownParser String rawVerbatimBlock = try $ do - (TagOpen tag _, open) <- htmlTag (tagOpen (\t -> - t == "pre" || t == "style" || t == "script") + (TagOpen tag _, open) <- htmlTag (tagOpen (flip elem + ["pre", "style", "script"]) (const True)) contents <- manyTill anyChar (htmlTag (~== TagClose tag)) return $ open ++ contents ++ renderTags [TagClose tag] |