From 6beba76f61faa41c4351fa4eb54161c060315a23 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 18 Mar 2011 11:27:42 -0700 Subject: Changed uri parser so it doesn't include trailing punctuation. So, in RST, 'http://google.com.' should be parsed as a link to 'http://google.com' followed by a period. The parser is smart enough to recognize balanced parentheses, as often occur in wikipedia links: 'http://foo.bar/baz_(bam)'. Also added ()s to RST specialChars, so '(http://google.com)' will be parsed as a link in parens. Added test cases. Resolves Issue #291. --- tests/rst-reader.native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/rst-reader.native b/tests/rst-reader.native index a88d499b0..3e521cb7c 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -222,7 +222,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ": ,Para [Str "But",Space,Str "not",Space,Str "here",Str ":"] ,CodeBlock ("",[],[]) "http://example.com/" ,Header 1 [Str "Images"] -,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902)",Str ":"] +,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(",Str "1902",Str ")",Str ":"] ,Plain [Image [Str "image"] ("lalune.jpg","")] ,Plain [Image [Str "Voyage dans la Lune"] ("lalune.jpg","")] ,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."] -- cgit v1.2.3