aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs2
-rw-r--r--tests/textile-reader.native1
-rw-r--r--tests/textile-reader.textile2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 19357b343..12d299aa4 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -465,7 +465,7 @@ link :: GenParser Char ParserState Inline
link = try $ do
name <- surrounded (char '"') inline
char ':'
- url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;," >> (space <|> newline))))
+ url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;,:" >> (space <|> newline))))
return $ Link name (url, "")
-- | Detect plain links to http or email.
diff --git a/tests/textile-reader.native b/tests/textile-reader.native
index 8c276d194..5dd6301f1 100644
--- a/tests/textile-reader.native
+++ b/tests/textile-reader.native
@@ -78,6 +78,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")]
,Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link [Str "http://www.example.com"] ("http://www.example.com",""),Space,Str "and",Space,Link [Str "foobar@example.com"] ("mailto:foobar@example.com",""),Str "."]
+,Para [Link [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon",Str "."]
,Header 1 [Str "Tables"]
,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"]
,Header 2 [Str "Without",Space,Str "headers"]
diff --git a/tests/textile-reader.textile b/tests/textile-reader.textile
index 9c9980307..85dcf142c 100644
--- a/tests/textile-reader.textile
+++ b/tests/textile-reader.textile
@@ -141,6 +141,8 @@ Just a "url":http://www.url.com
Automatic linking to http://www.example.com and foobar@example.com.
+"Example":http://www.example.com/: Example of a link followed by a colon.
+
h1. Tables
Textile allows tables with and without headers :