git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: fix bug for certain links in table cells.

Closes #3667.

commit37189667cc2bc86d308ad771318528bd77876912 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 15 May 2017, 20:36 (9 years ago) parent1e2dc33
2 files changed+18−2
src/Text/Pandoc/Readers/Textile.hs+5−2 test/command/3667.md+13
src/Text/Pandoc/Readers/Textile.hs+5−2
@@ -586,8 +586,9 @@ link = try $ do
586586 char ':'
587587 let stop = if bracketed
588588 then char ']'
589− else lookAhead $ space <|>
590− try (oneOf "!.,;:" *> (space <|> newline))
589+ else lookAhead $ space <|> eof' <|>
590+ try (oneOf "!.,;:" *>
591+ (space <|> newline <|> eof'))
591592 url <- many1Till nonspaceChar stop
592593 let name' = if B.toList name == [Str "$"] then B.str url else name
593594 return $ if attr == nullAttr
@@ -728,3 +729,5 @@ groupedInlineMarkup = try $ do
728729singleton :: a -> [a]
729730singleton x = [x]
730731
732+eof' :: Monad m => ParserT [Char] s m Char
733+eof' = '\n' <$ eof
test/command/3667.mdnew file+13
@@ -0,0 +1,13 @@
1+```
2+% pandoc -f textile
3+| "link text":http://example.com/ |
4+^D
5+<table>
6+<tbody>
7+<tr class="odd">
8+<td><a href="http://example.com/">link text</a></td>
9+</tr>
10+</tbody>
11+</table>
12+```
13+