aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-13 11:39:32 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-13 11:39:32 -0800
commit0598cf0fee810f809e976cc7e564d07c55080d49 (patch)
treef604f5eafc86261ee4c460162f253c2e65c7f0dd /src/Text/Pandoc/Readers
parentb92b8e8a3da929ff0c96cef6c085d21016ac1851 (diff)
downloadpandoc-0598cf0fee810f809e976cc7e564d07c55080d49.tar.gz
Moved lineBlockLines to Parsing.
This will be used by both RST and markdown readers.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 619f0ecff..9699cf333 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -201,22 +201,11 @@ fieldList = try $ do
-- line block
--
-lineBlockLine :: RSTParser String
-lineBlockLine = try $ do
- char '|'
- char ' '
- white <- many (spaceChar >> return '\160')
- notFollowedBy newline
- line <- anyLine
- continuations <- many (try $ char ' ' >> anyLine)
- return $ white ++ unwords (line : continuations)
-
lineBlock :: RSTParser Blocks
lineBlock = try $ do
- lines' <- many1 lineBlockLine
+ lines' <- lineBlockLines
lines'' <- mapM (parseFromString
(trimInlines . mconcat <$> many inline)) lines'
- skipMany1 $ blankline <|> try (char '|' >> blankline)
return $ B.para (mconcat $ intersperse B.linebreak lines'')
--