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 = 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