MediaWiki reader internals: remove unnecessary binding
This commit is contained in:
parent
8ae18138df
commit
bbe34da854
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue