git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: Make it possible to have colons after links.
8fa4e8bChristoffer Sawicki
src/Text/Pandoc/Readers/Textile.hs+1−1
@@ -465,7 +465,7 @@ link :: GenParser Char ParserState Inline
465link = try $ do
465link = try $ do
466 name <- surrounded (char '"') inline
466 name <- surrounded (char '"') inline
467 char ':'
467 char ':'
468− url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;," >> (space <|> newline))))
468+ url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;,:" >> (space <|> newline))))
469 return $ Link name (url, "")
469 return $ Link name (url, "")
470
470
471-- | Detect plain links to http or email.
471-- | Detect plain links to http or email.
tests/textile-reader.native+1
@@ -78,6 +78,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
78,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")]
78,Para [Str "Just",Space,Str "a",Space,Link [Str "url"] ("http://www.url.com","")]
79,Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
79,Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
80,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 "."]
80,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 "."]
81+,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 "."]
81,Header 1 [Str "Tables"]
82,Header 1 [Str "Tables"]
82,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"]
83,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"]
83,Header 2 [Str "Without",Space,Str "headers"]
84,Header 2 [Str "Without",Space,Str "headers"]
tests/textile-reader.textile+2
@@ -141,6 +141,8 @@ Just a "url":http://www.url.com
141
141
142Automatic linking to http://www.example.com and foobar@example.com.
142Automatic linking to http://www.example.com and foobar@example.com.
143
143
144+"Example":http://www.example.com/: Example of a link followed by a colon.
145+
144h1. Tables
146h1. Tables
145
147
146Textile allows tables with and without headers :
148Textile allows tables with and without headers :