diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 3fee1c57a..1ee1b801e 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1826,9 +1826,9 @@ source = do return $ "(" <> result <> ")" let linkTitle' = try $ spnl >> linkTitle let urlChunk = do - notFollowedBy linkTitle' try parenthesizedChars - <|> (notFollowedBy (oneOf " )") >> litChar) + <|> (notFollowedBy (oneOf "\n\r )") >> litChar) + <|> (lookAhead (oneOf "\n\r") >> notFollowedBy linkTitle' >> litChar) <|> try (many1Char spaceChar <* notFollowedBy (oneOf "\"')")) let sourceURL = T.unwords . T.words . T.concat <$> many urlChunk src <- try (litBetween '<' '>') <|> try base64DataURI <|> sourceURL |
