aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index aa2d9d14d..ce8a4b8eb 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -56,7 +56,6 @@ readMarkdown state str = (readWith parseMarkdown) state (str ++ "\n\n")
spaceChars = " \t"
bulletListMarkers = "*+-"
hruleChars = "*-_"
-titleOpeners = "\"'("
setextHChars = "=-"
-- treat these as potentially non-text when parsing inline:
@@ -185,8 +184,7 @@ referenceKey = try $ do
return $ replicate (sourceLine endPos - sourceLine startPos) '\n'
referenceTitle = try $ do
- skipSpaces
- optional newline
+ (many1 spaceChar >> option '\n' newline) <|> newline
skipSpaces
tit <- (charsInBalanced '(' ')' >>= return . unwords . words)
<|> do delim <- char '\'' <|> char '"'
@@ -831,8 +829,7 @@ source = try $ do
return (removeTrailingSpace src, tit)
linkTitle = try $ do
- skipSpaces
- optional newline
+ (many1 spaceChar >> option '\n' newline) <|> newline
skipSpaces
delim <- char '\'' <|> char '"'
tit <- manyTill anyChar (try (char delim >> skipSpaces >>