aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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