aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-22 11:16:00 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-22 11:16:00 -0700
commit7a111d2d334687b3a099d260ffd6bf774453d273 (patch)
tree43ce5537354c062d7387fbf488d5bc52a099d205 /src/Text/Pandoc/Readers
parent44b1cd620dce63239a37294737fbe9e40bee0c96 (diff)
downloadpandoc-7a111d2d334687b3a099d260ffd6bf774453d273.tar.gz
Man reader: Support .EX/.EE macros.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index 5d75bc72c..6916e56db 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -650,9 +650,8 @@ bareIP = msatisfy isBareIP where
parseCodeBlock :: PandocMonad m => ManParser m Blocks
parseCodeBlock = try $ do
optional bareIP -- some people indent their code
- mmacro "nf"
- toks <- many (mline <|> memptyLine)
- mmacro "fi"
+ toks <- (mmacro "nf" *> many (mline <|> memptyLine) <* mmacro "fi")
+ <|> (mmacro "EX" *> many (mline <|> memptyLine) <* mmacro "EE")
return $ codeBlock (intercalate "\n" . catMaybes $
extractText <$> toks)