aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-15 20:36:11 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-15 20:36:11 +0200
commit37189667cc2bc86d308ad771318528bd77876912 (patch)
tree7430b8ed8856b307092b2fd1a9acf2933edfe5c7 /src
parent1e2dc33165a0baf11e64553599887105030f4297 (diff)
downloadpandoc-37189667cc2bc86d308ad771318528bd77876912.tar.gz
Textile reader: fix bug for certain links in table cells.
Closes #3667.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index df057837f..abf8be452 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -586,8 +586,9 @@ link = try $ do
char ':'
let stop = if bracketed
then char ']'
- else lookAhead $ space <|>
- try (oneOf "!.,;:" *> (space <|> newline))
+ else lookAhead $ space <|> eof' <|>
+ try (oneOf "!.,;:" *>
+ (space <|> newline <|> eof'))
url <- many1Till nonspaceChar stop
let name' = if B.toList name == [Str "$"] then B.str url else name
return $ if attr == nullAttr
@@ -728,3 +729,5 @@ groupedInlineMarkup = try $ do
singleton :: a -> [a]
singleton x = [x]
+eof' :: Monad m => ParserT [Char] s m Char
+eof' = '\n' <$ eof