aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-29 09:25:53 +0200
committerGitHub <noreply@github.com>2017-05-29 09:25:53 +0200
commitd461b29d9d26e04fe6978b08d027fb46db6c3f16 (patch)
treed3488c31e2d1d4c703a698f2e57cbe1ef4bdfcb9 /src/Text/Pandoc
parent345bf8b6156938e60562f1f0f6b6e3354575cfcd (diff)
parentefc069de5d6714119eac6d70338cac514d07139c (diff)
downloadpandoc-d461b29d9d26e04fe6978b08d027fb46db6c3f16.tar.gz
Merge pull request #3704 from labdsf/anylinenewline
Markdown reader: use anyLineNewline
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 95310346c..7e2bd5a4d 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -883,8 +883,7 @@ listContinuationLine = try $ do
notFollowedBy' listStart
notFollowedByHtmlCloser
optional indentSpaces
- result <- anyLine
- return $ result ++ "\n"
+ anyLineNewline
listItem :: PandocMonad m
=> MarkdownParser m a
@@ -956,7 +955,7 @@ defRawBlock :: PandocMonad m => Bool -> MarkdownParser m String
defRawBlock compact = try $ do
hasBlank <- option False $ blankline >> return True
defListMarker
- firstline <- anyLine
+ firstline <- anyLineNewline
let dline = try
( do notFollowedBy blankline
notFollowedByHtmlCloser
@@ -971,7 +970,7 @@ defRawBlock compact = try $ do
ln <- indentSpaces >> notFollowedBy blankline >> anyLine
lns <- many dline
return $ trailing ++ unlines (ln:lns)
- return $ trimr (firstline ++ "\n" ++ unlines rawlines ++ cont) ++
+ return $ trimr (firstline ++ unlines rawlines ++ cont) ++
if hasBlank || not (null cont) then "\n\n" else ""
definitionList :: PandocMonad m => MarkdownParser m (F Blocks)