aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-28 11:44:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-28 11:44:41 -0700
commit07647f05f023206673803119bab805939b17c3d1 (patch)
tree47f55d2d9cd42a613544b5d62ff422bef28e4176 /src
parent8de8313ca10c80cd417a05657a905d37c9331de3 (diff)
downloadpandoc-07647f05f023206673803119bab805939b17c3d1.tar.gz
Man reader: skip .in used for indentation of code.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index 87c39a4b9..e06ba2353 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -379,9 +379,10 @@ endmacro name = void (mmacro name)
parseCodeBlock :: PandocMonad m => ManParser m Blocks
parseCodeBlock = try $ do
- optional bareIP -- some people indent their code
+ optional (bareIP <|> mmacro "in") -- some people indent their code
toks <- (mmacro "nf" *> manyTill codeline (endmacro "fi"))
<|> (mmacro "EX" *> manyTill codeline (endmacro "EE"))
+ optional (mmacro "in")
return $ codeBlock (intercalate "\n" $ catMaybes toks)
where