From 7a111d2d334687b3a099d260ffd6bf774453d273 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 22 Oct 2018 11:16:00 -0700 Subject: Man reader: Support .EX/.EE macros. --- src/Text/Pandoc/Readers/Man.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Readers') 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) -- cgit v1.2.3