aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-20 07:48:20 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-20 09:30:37 -0700
commitfaa35bb014626fd4143b54904827d5bbc82bd15c (patch)
tree00ed3a99f17ecf8b6231efd6c3019a711d536064 /src
parent11e681edac3cbdc94af90bee8370e8aa4fddf955 (diff)
downloadpandoc-faa35bb014626fd4143b54904827d5bbc82bd15c.tar.gz
Man reader: minor refactoring.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index e420ee0ab..458a9bfce 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -510,7 +510,7 @@ type ListBuilder = [Blocks] -> Blocks
parseList :: PandocMonad m => ManParser m Blocks
parseList = try $ do
- xx <- many1 paras
+ xx <- many1 items
let bls = map snd xx
let bldr = fst $ head xx
return $ bldr bls
@@ -528,20 +528,20 @@ parseList = try $ do
Left _ -> bulletList
listKind _ = bulletList
- paras :: PandocMonad m => ManParser m (ListBuilder, Blocks)
- paras = do
+ items :: PandocMonad m => ManParser m (ListBuilder, Blocks)
+ items = do
(MMacro _ args) <- mmacro "IP"
let lbuilder = listKind args
inls <- parseInlines
continuations <- mconcat <$> many continuation
return $ (lbuilder, para inls <> continuations)
- continuation :: PandocMonad m => ManParser m Blocks
- continuation = do
- mmacro "RS"
- bs <- mconcat <$> many (notFollowedBy (mmacro "RE") >> parseBlock)
- mmacro "RE"
- return bs
+continuation :: PandocMonad m => ManParser m Blocks
+continuation = do
+ mmacro "RS"
+ bs <- mconcat <$> many (notFollowedBy (mmacro "RE") >> parseBlock)
+ mmacro "RE"
+ return bs
-- In case of weird man file it will be parsed succesfully
parseSkipMacro :: PandocMonad m => ManParser m Blocks