Man reader: skip optional .IP before code block.

This commit is contained in:
John MacFarlane 2018-10-19 23:59:12 -07:00
parent c60ac7c9ab
commit 0c419a01f7

View file

@ -466,9 +466,14 @@ parseInlines = do
comment :: PandocMonad m => ManParser m Inlines
comment = mcomment >> return mempty
bareIP :: PandocMonad m => ManParser m ManToken
bareIP = msatisfy isBareIP where
isBareIP (MMacro "IP" []) = True
isBareIP _ = False
parseCodeBlock :: PandocMonad m => ManParser m Blocks
parseCodeBlock = try $ do
optional bareIP -- some people indent their code
mmacro "nf"
toks <- many (mstr <|> mline <|> mmaybeLink <|> memptyLine <|> mcomment)
mmacro "fi"