aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Man.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index e4bf58081..e420ee0ab 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -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"