MediaWiki reader internals: remove unnecessary binding

This commit is contained in:
Alexander Krotov 2018-11-25 03:39:02 +03:00
parent 8ae18138df
commit bbe34da854

View file

@ -415,8 +415,7 @@ encode = B.fromList . normalizeCode . B.toList . walk strToCode
header :: PandocMonad m => MWParser m Blocks header :: PandocMonad m => MWParser m Blocks
header = try $ do header = try $ do
guardColumnOne guardColumnOne
eqs <- many1 (char '=') lev <- length <$> many1 (char '=')
let lev = length eqs
guard $ lev <= 6 guard $ lev <= 6
contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=') contents <- trimInlines . mconcat <$> manyTill inline (count lev $ char '=')
attr <- registerHeader nullAttr contents attr <- registerHeader nullAttr contents