git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3704 from labdsf/anylinenewline
d461b29John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+3−4
@@ -883,8 +883,7 @@ listContinuationLine = try $ do
883 notFollowedBy' listStart
883 notFollowedBy' listStart
884 notFollowedByHtmlCloser
884 notFollowedByHtmlCloser
885 optional indentSpaces
885 optional indentSpaces
886− result <- anyLine
886+ anyLineNewline
887− return $ result ++ "\n"
888
887
889listItem :: PandocMonad m
888listItem :: PandocMonad m
890 => MarkdownParser m a
889 => MarkdownParser m a
@@ -956,7 +955,7 @@ defRawBlock :: PandocMonad m => Bool -> MarkdownParser m String
956defRawBlock compact = try $ do
955defRawBlock compact = try $ do
957 hasBlank <- option False $ blankline >> return True
956 hasBlank <- option False $ blankline >> return True
958 defListMarker
957 defListMarker
959− firstline <- anyLine
958+ firstline <- anyLineNewline
960 let dline = try
959 let dline = try
961 ( do notFollowedBy blankline
960 ( do notFollowedBy blankline
962 notFollowedByHtmlCloser
961 notFollowedByHtmlCloser
@@ -971,7 +970,7 @@ defRawBlock compact = try $ do
971 ln <- indentSpaces >> notFollowedBy blankline >> anyLine
970 ln <- indentSpaces >> notFollowedBy blankline >> anyLine
972 lns <- many dline
971 lns <- many dline
973 return $ trailing ++ unlines (ln:lns)
972 return $ trailing ++ unlines (ln:lns)
974− return $ trimr (firstline ++ "\n" ++ unlines rawlines ++ cont) ++
973+ return $ trimr (firstline ++ unlines rawlines ++ cont) ++
975 if hasBlank || not (null cont) then "\n\n" else ""
974 if hasBlank || not (null cont) then "\n\n" else ""
976
975
977definitionList :: PandocMonad m => MarkdownParser m (F Blocks)
976definitionList :: PandocMonad m => MarkdownParser m (F Blocks)