diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-28 12:00:25 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-28 12:00:25 -0700 |
commit | fd672f9722e642ec6c4d7dd4a1564c9d6e869938 (patch) | |
tree | 9f9dfe0a0947f5bcec436b80fb279c58263ea51f /src/Text/Pandoc/Readers | |
parent | 26a75832090ef17f56c12cc2c74bc7e13a7e88b1 (diff) | |
download | pandoc-fd672f9722e642ec6c4d7dd4a1564c9d6e869938.tar.gz |
Man reader: improved code blocks as continuation in list items.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index 8773fb65c..d3e47f26a 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -102,13 +102,13 @@ parseMan = do parseBlock :: PandocMonad m => ManParser m Blocks parseBlock = choice [ parseList , parseDefinitionList - , parseBlockQuote + , parseHeader + , parseTable , parseTitle + , parseCodeBlock + , parseBlockQuote , parseNewParagraph , parsePara - , parseCodeBlock - , parseHeader - , parseTable , skipUnkownMacro ] @@ -470,7 +470,9 @@ parseList = try $ do continuation :: PandocMonad m => ManParser m Blocks continuation = mconcat <$> (mmacro "RS" *> manyTill parseBlock (endmacro "RE")) - <|> mconcat <$> many1 (try (bareIP *> parsePara)) + <|> mconcat <$> many1 ( try (bareIP *> parsePara) + <|> try (bareIP *> parseCodeBlock) + ) definitionListItem :: PandocMonad m => ManParser m (Inlines, [Blocks]) |