aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-11-25 03:39:02 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-11-25 03:39:02 +0300
commitbbe34da85475675dff0d8b6383e26ac783774060 (patch)
treee3fa6a8fd7390ea8ee5831f0f9fdac4f4bbb1ca2 /src/Text
parent8ae18138dff7ae589611312c39b12e1d2c5ee5ce (diff)
downloadpandoc-bbe34da85475675dff0d8b6383e26ac783774060.tar.gz
MediaWiki reader internals: remove unnecessary binding
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 764b57f18..ff66da0b2 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -415,8 +415,7 @@ encode = B.fromList . normalizeCode . B.toList . walk strToCode
header :: PandocMonad m => MWParser m Blocks
header = try $ do
guardColumnOne
- eqs <- many1 (char '=')
- let lev = length eqs
+ lev <- length <$> many1 (char '=')
guard $ lev <= 6
contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=')
attr <- registerHeader nullAttr contents