diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index 9ead84f3e..4eeeeb825 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -554,15 +554,15 @@ parseList = try $ do (MMacro _ args) <- mmacro "IP" let lbuilder = listKind args inls <- parseInlines - subls <- mconcat <$> many sublist - return $ (lbuilder, plain inls <> subls) + continuations <- mconcat <$> many continuation + return $ (lbuilder, para inls <> continuations) - sublist :: PandocMonad m => ManParser m Blocks - sublist = do + continuation :: PandocMonad m => ManParser m Blocks + continuation = do mmacro "RS" - bl <- parseList + bs <- mconcat <$> many (notFollowedBy (mmacro "RE") >> parseBlock) mmacro "RE" - return bl + return bs -- In case of weird man file it will be parsed succesfully parseSkipMacro :: PandocMonad m => ManParser m Blocks |