aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-28 12:00:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-28 12:00:25 -0700
commitfd672f9722e642ec6c4d7dd4a1564c9d6e869938 (patch)
tree9f9dfe0a0947f5bcec436b80fb279c58263ea51f /src/Text/Pandoc/Readers
parent26a75832090ef17f56c12cc2c74bc7e13a7e88b1 (diff)
downloadpandoc-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.hs12
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])