diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/html-reader.native | 86 | ||||
-rw-r--r-- | tests/rst-reader.native | 22 | ||||
-rw-r--r-- | tests/testsuite.native | 98 | ||||
-rw-r--r-- | tests/writer.markdown | 67 | ||||
-rw-r--r-- | tests/writer.native | 98 | ||||
-rw-r--r-- | tests/writer.rst | 144 |
6 files changed, 200 insertions, 315 deletions
diff --git a/tests/html-reader.native b/tests/html-reader.native index 1b919e101..f7de8df4a 100644 --- a/tests/html-reader.native +++ b/tests/html-reader.native @@ -2,7 +2,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."] , HorizontalRule , Header 1 [Str "Headers"] -, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] (Ref [Str "1"])] +, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")] , Header 3 [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] , Header 4 [Str "Level",Space,Str "4"] , Header 5 [Str "Level",Space,Str "5"] @@ -187,7 +187,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , Header 1 [Str "Inline",Space,Str "Markup"] , Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] , Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."] -, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] (Ref [Str "1"])],Str "."] +, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] , Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] @@ -199,7 +199,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , Para [Str "'A',",Space,Str "'B',",Space,Str "and",Space,Str "'C'",Space,Str "are",Space,Str "letters."] , Para [Str "'Oak,'",Space,Str "'elm,'",Space,Str "and",Space,Str "'beech'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Str "'pine.'"] , Para [Str "'He",Space,Str "said,",Space,Str "\"I",Space,Str "want",Space,Str "to",Space,Str "go.\"'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70's?"] -, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link [Str "quoted",Space,Str "link"] (Ref [Str "2"]),Str "\"."] +, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"."] , Para [Str "Some",Space,Str "dashes:",Space,Str "one---two",Space,Str "---",Space,Str "three--four",Space,Str "--",Space,Str "five."] , Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5-7,",Space,Str "255-66,",Space,Str "1987-1999."] , Para [Str "Ellipses...and.",Space,Str ".",Space,Str ".and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."] @@ -255,74 +255,54 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , HorizontalRule , Header 1 [Str "Links"] , Header 2 [Str "Explicit"] -, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] (Ref [Str "3"]),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Ref [Str "4"]),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Ref [Str "5"]),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Ref [Str "6"]),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Ref [Str "7"])] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Ref [Str "8"])] +, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] , Plain [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"] -, Para [Link [Str "Empty"] (Ref [Str "9"]),Str "."] +, Para [Link [Str "Empty"] ("",""),Str "."] , Header 2 [Str "Reference"] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "3"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "3"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "3"]),Str "."] -, Para [Str "With",Space,Link [Str "embedded",Space,Str "[brackets]"] (Ref [Str "3"]),Str "."] -, Para [Link [Str "b"] (Ref [Str "3"]),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] -, Para [Str "Indented",Space,Link [Str "once"] (Ref [Str "1"]),Str "."] -, Para [Str "Indented",Space,Link [Str "twice"] (Ref [Str "1"]),Str "."] -, Para [Str "Indented",Space,Link [Str "thrice"] (Ref [Str "1"]),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "With",Space,Link [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] +, Para [Link [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] +, Para [Str "Indented",Space,Link [Str "once"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "twice"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "thrice"] ("/url",""),Str "."] , Para [Str "This",Space,Str "should",Space,Str "[not]",Space,Str "be",Space,Str "a",Space,Str "link."] , CodeBlock "[not]: /url" -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "10"]),Str "."] -, Para [Str "Foo",Space,Link [Str "biz"] (Ref [Str "11"]),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] +, Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] , Header 2 [Str "With",Space,Str "ampersands"] -, Para [Str "Here's",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] (Ref [Str "2"]),Str "."] -, Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] (Ref [Str "12"]),Str "."] -, Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] (Ref [Str "13"]),Str "."] -, Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] (Ref [Str "13"]),Str "."] +, Para [Str "Here's",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +, Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."] +, Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] +, Para [Str "Here's",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] , Header 2 [Str "Autolinks"] -, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1",Str "&",Str "bar=2"] (Ref [Str "2"])] +, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1",Str "&",Str "bar=2"] ("http://example.com/?foo=1&bar=2","")] , BulletList [ [ Plain [Str "In",Space,Str "a",Space,Str "list?"] ] - , [ Plain [Link [Str "http://example.com/"] (Ref [Str "14"])] ] + , [ Plain [Link [Str "http://example.com/"] ("http://example.com/","")] ] , [ Plain [Str "It",Space,Str "should."] ] ] , Plain [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere.net"] , BlockQuote - [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] (Ref [Str "14"])] ] + [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")] ] , Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"] , CodeBlock "or here: <http://example.com/>" , HorizontalRule , Header 1 [Str "Images"] , Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] -, Para [Image [Str "lalune"] (Ref [Str "15"])] -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Ref [Str "16"]),Space,Str "icon."] +, Para [Image [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon."] , HorizontalRule , Header 1 [Str "Footnotes"] -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link [Str "(1)"] (Ref [Str "17"]),Str ",",Space,Str "and",Space,Str "another",Link [Str "(longnote)"] (Ref [Str "18"]),Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."] -, Para [Link [Str "(1)"] (Ref [Str "19"]),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."] -, Para [Link [Str "(longnote)"] (Ref [Str "20"]),Space,Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link [Str "(1)"] ("#note_1",""),Str ",",Space,Str "and",Space,Str "another",Link [Str "(longnote)"] ("#note_longnote",""),Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."] +, Para [Link [Str "(1)"] ("#ref_1",""),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."] +, Para [Link [Str "(longnote)"] ("#ref_longnote",""),Space,Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."] , Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."] , CodeBlock " { <code> }" -, Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] -, Key [Str "1"] (Src "/url" "") -, Key [Str "2"] (Src "http://example.com/?foo=1&bar=2" "") -, Key [Str "3"] (Src "/url/" "") -, Key [Str "4"] (Src "/url/" "title") -, Key [Str "5"] (Src "/url/" "title preceded by two spaces") -, Key [Str "6"] (Src "/url/" "title preceded by a tab") -, Key [Str "7"] (Src "/url/" "title with \"quotes\" in it") -, Key [Str "8"] (Src "/url/" "title with single quotes") -, Key [Str "9"] (Src "" "") -, Key [Str "10"] (Src "/url/" "Title with \"quotes\" inside") -, Key [Str "11"] (Src "/url/" "Title with \"quote\" inside") -, Key [Str "12"] (Src "http://att.com/" "AT&T") -, Key [Str "13"] (Src "/script?foo=1&bar=2" "") -, Key [Str "14"] (Src "http://example.com/" "") -, Key [Str "15"] (Src "lalune.jpg" "Voyage dans la Lune") -, Key [Str "16"] (Src "movie.jpg" "") -, Key [Str "17"] (Src "#note_1" "") -, Key [Str "18"] (Src "#note_longnote" "") -, Key [Str "19"] (Src "#ref_1" "") -, Key [Str "20"] (Src "#ref_longnote" "") ] +, Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] ] diff --git a/tests/rst-reader.native b/tests/rst-reader.native index e9d2e947e..26116b5c5 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -156,21 +156,15 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str , Para [Str "Plus",Str ":",Space,Str "+"] , Para [Str "Minus",Str ":",Space,Str "-"] , Header 1 [Str "Links"] -, Para [Str "Explicit",Str ":",Space,Str "a",Space,Link [Str "URL"] (Src "/url/" ""),Str "."] -, Para [Str "Two",Space,Str "anonymous",Space,Str "links",Str ":",Space,Link [Str "the",Space,Str "first"] (Src "/url1/" ""),Space,Str "and",Space,Link [Str "the",Space,Str "second"] (Src "/url2/" "")] -, Para [Str "Reference",Space,Str "links",Str ":",Space,Link [Str "link1"] (Ref []),Space,Str "and",Space,Link [Str "link2"] (Ref []),Space,Str "and",Space,Link [Str "link1"] (Ref []),Space,Str "again."] -, Key [Str "link1"] (Src "/url1/" "") -, Key [Str "link2"] (Src "/url2/" "") -, Para [Str "Here's",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] (Ref []),Str "."] -, Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT&T"] (Src "/url/" ""),Str "."] -, Key [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] (Src "http://example.com/?foo=1&bar=2" "") -, Para [Str "Autolinks",Str ":",Space,Link [Str "http://example.com/?foo=1&bar=2"] (Src "http://example.com/?foo=1&bar=2" ""),Space,Str "and",Space,Link [Str "nobody@nowhere.net"] (Src "mailto:nobody@nowhere.net" ""),Str "."] +, Para [Str "Explicit",Str ":",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."] +, Para [Str "Two",Space,Str "anonymous",Space,Str "links",Str ":",Space,Link [Str "the",Space,Str "first"] ("/url1/",""),Space,Str "and",Space,Link [Str "the",Space,Str "second"] ("/url2/","")] +, Para [Str "Reference",Space,Str "links",Str ":",Space,Link [Str "link1"] ("/url1/",""),Space,Str "and",Space,Link [Str "link2"] ("/url2/",""),Space,Str "and",Space,Link [Str "link1"] ("/url1/",""),Space,Str "again."] +, Para [Str "Here's",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +, Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text",Str ":",Space,Link [Str "AT&T"] ("/url/",""),Str "."] +, Para [Str "Autolinks",Str ":",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2",""),Space,Str "and",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net",""),Str "."] , Para [Str "But",Space,Str "not",Space,Str "here",Str ":"] , CodeBlock "http://example.com/" , Header 1 [Str "Images"] , Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902)",Str ":"] -, Plain [Image [Str "image"] (Src "lalune.jpg" "")] -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Ref [Str "movie"]),Space,Str "icon."] -, Key [Str "movie"] (Src "movie.jpg" "") -, Null -, Plain [] ] +, Plain [Image [Str "image"] ("lalune.jpg","")] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon."] ] diff --git a/tests/testsuite.native b/tests/testsuite.native index bc4970e12..a35a32737 100644 --- a/tests/testsuite.native +++ b/tests/testsuite.native @@ -2,7 +2,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."] , HorizontalRule , Header 1 [Str "Headers"] -, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] (Src "/url" "")] +, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")] , Header 3 [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] , Header 4 [Str "Level",Space,Str "4"] , Header 5 [Str "Level",Space,Str "5"] @@ -196,7 +196,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , Header 1 [Str "Inline",Space,Str "Markup"] , Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] , Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."] -, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] (Src "/url" "")],Str "."] +, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]] , Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]] @@ -208,7 +208,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters",Str "."] , Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine",Str "."]] , Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s?"] -, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] (Ref [Str "1"])],Str "."] +, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] , Para [Str "Some",Space,Str "dashes:",Space,Str "one",EmDash,Str "two",EmDash,Str "three",EmDash,Str "four",EmDash,Str "five",Str "."] , Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5",EnDash,Str "7,",Space,Str "255",EnDash,Str "66,",Space,Str "1987",EnDash,Str "1999",Str "."] , Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."] @@ -264,83 +264,57 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , HorizontalRule , Header 1 [Str "Links"] , Header 2 [Str "Explicit"] -, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] (Src "/url/" ""),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title preceded by two spaces"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title preceded by a tab"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title with \"quotes\" in it")] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title with single quotes")] -, Para [Link [Str "with",Str "_",Str "underscore"] (Src "/url/with_underscore" "")] -, Para [Link [Str "Email",Space,Str "link"] (Src "mailto:nobody@nowhere.net" "")] -, Para [Link [Str "Empty"] (Src "" ""),Str "."] +, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] +, Para [Link [Str "with",Str "_",Str "underscore"] ("/url/with_underscore","")] +, Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] +, Para [Link [Str "Empty"] ("",""),Str "."] , Header 2 [Str "Reference"] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Key [Str "a"] (Src "/url/" "") -, Para [Str "With",Space,Link [Str "embedded",Space,Str "[",Str "brackets",Str "]"] (Ref [Str "b"]),Str "."] -, Para [Link [Str "b"] (Ref [Str "b"]),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] -, Para [Str "Indented",Space,Link [Str "once"] (Ref [Str "once"]),Str "."] -, Para [Str "Indented",Space,Link [Str "twice"] (Ref [Str "twice"]),Str "."] -, Para [Str "Indented",Space,Link [Str "thrice"] (Ref [Str "thrice"]),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "With",Space,Link [Str "embedded",Space,Str "[",Str "brackets",Str "]"] ("/url/",""),Str "."] +, Para [Link [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] +, Para [Str "Indented",Space,Link [Str "once"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "twice"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "thrice"] ("/url",""),Str "."] , Para [Str "This",Space,Str "should",Space,Str "[",Str "not",Str "]",Str "[",Str "]",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] -, Key [Str "once"] (Src "/url" "") -, Key [Str "twice"] (Src "/url" "") -, Key [Str "thrice"] (Src "/url" "") , CodeBlock "[not]: /url" -, Key [Str "b"] (Src "/url/" "") -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "bar"]),Str "."] -, Para [Str "Foo",Space,Link [Str "biz"] (Src "/url/" "Title with \"quote\" inside"),Str "."] -, Key [Str "bar"] (Src "/url/" "Title with \"quotes\" inside") +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] +, Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] , Header 2 [Str "With",Space,Str "ampersands"] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] (Ref [Str "1"]),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] (Ref [Str "2"]),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] (Src "/script?foo=1&bar=2" ""),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] (Src "/script?foo=1&bar=2" ""),Str "."] -, Key [Str "1"] (Src "http://example.com/?foo=1&bar=2" "") -, Key [Str "2"] (Src "http://att.com/" "AT&T") +, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] , Header 2 [Str "Autolinks"] -, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] (Src "http://example.com/?foo=1&bar=2" "")] +, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] , BulletList [ [ Plain [Str "In",Space,Str "a",Space,Str "list?"] ] - , [ Plain [Link [Str "http://example.com/"] (Src "http://example.com/" "")] ] + , [ Plain [Link [Str "http://example.com/"] ("http://example.com/","")] ] , [ Plain [Str "It",Space,Str "should",Str "."] ] ] -, Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] (Src "mailto:nobody@nowhere.net" "")] +, Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] , BlockQuote - [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] (Src "http://example.com/" "")] ] + [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")] ] , Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"] , CodeBlock "or here: <http://example.com/>" , HorizontalRule , 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):"] -, Para [Image [Str "lalune"] (Ref [Str "lalune"])] -, Key [Str "lalune"] (Src "lalune.jpg" "Voyage dans la Lune") -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Src "movie.jpg" ""),Space,Str "icon",Str "."] +, Para [Image [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."] , HorizontalRule , Header 1 [Str "Footnotes"] -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",NoteRef "1",Space,Str "and",Space,Str "another",Str ".",NoteRef "2",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",NoteRef "3"] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)",Str "."],CodeBlock " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code "]",Space,Str "verbatim",Space,Str "characters",Str "."]]] , BlockQuote - [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",NoteRef "4"] ] + [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]] ] , OrderedList - [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",NoteRef "5"] ] - ] -, Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] -, Note "1" - [ Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."] ] - -, Note "2" - [ Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."] - , Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)",Str "."] - , CodeBlock " { <code> }" - , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."] ] -, Note "3" - [ Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] (Src "http://google.com" ""),Space,Str "and",Space,Code "]",Space,Str "verbatim",Space,Str "characters",Str "."] ] - -, Note "4" - [ Para [Str "In",Space,Str "quote",Str "."] ] - -, Note "5" - [ Para [Str "In",Space,Str "list",Str "."] ] + [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] +, Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] ] diff --git a/tests/writer.markdown b/tests/writer.markdown index bae2008dd..a80857cc2 100644 --- a/tests/writer.markdown +++ b/tests/writer.markdown @@ -401,7 +401,8 @@ This is code: `>`, `$`, `\`, `\$`, `<html>`. 'He said, "I want to go."' Were you alive in the 70's? -Here is some quoted '`code`' and a "[quoted link][1]". +Here is some quoted '`code`' and a +"[quoted link](http://example.com/?foo=1&bar=2)". Some dashes: one--two--three--four--five. @@ -522,57 +523,42 @@ Just a [URL](/url/). ## Reference -Foo [bar][a]. +Foo [bar](/url/). -Foo [bar][a]. +Foo [bar](/url/). -Foo [bar][a]. +Foo [bar](/url/). +With [embedded [brackets]](/url/). - [a]: /url/ +[b](/url/) by itself should be a link. -With [embedded [brackets]][b]. +Indented [once](/url). -[b][] by itself should be a link. +Indented [twice](/url). -Indented [once][]. - -Indented [twice][]. - -Indented [thrice][]. +Indented [thrice](/url). This should [not][] be a link. - - [once]: /url - [twice]: /url - [thrice]: /url [not]: /url - - [b]: /url/ - -Foo [bar][]. +Foo [bar](/url/ "Title with "quotes" inside"). Foo [biz](/url/ "Title with "quote" inside"). - - [bar]: /url/ "Title with "quotes" inside" - ## With ampersands -Here's a [link with an ampersand in the URL][1]. +Here's a +[link with an ampersand in the URL](http://example.com/?foo=1&bar=2). -Here's a link with an amersand in the link text: [AT&T][2]. +Here's a link with an amersand in the link text: +[AT&T](http://att.com/ "AT&T"). Here's an [inline link](/script?foo=1&bar=2). Here's an [inline link in pointy braces](/script?foo=1&bar=2). - - [1]: http://example.com/?foo=1&bar=2 - [2]: http://att.com/ "AT&T" - ## Autolinks With an ampersand: <http://example.com/?foo=1&bar=2> @@ -596,10 +582,7 @@ Auto-links should not occur here: `<http://example.com/>` From "Voyage dans la Lune" by Georges Melies (1902): -![lalune][] - - - [lalune]: lalune.jpg "Voyage dans la Lune" + Here is a movie  icon. @@ -619,25 +602,27 @@ note] Here is an inline note.[^3] This paragraph should not be part of the note, as it is not indented. -[^1]: Here is the footnote. It can go anywhere after the footnote + +[^1]: + Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. -[^2]: Here's the long note. This one contains multiple blocks. - +[^2]: + Here's the long note. This one contains multiple blocks. + Subsequent blocks are indented to show that they belong to the footnote (as with list items). - + { <code> } - + If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. -[^3]: This is *easier* to type. Inline notes may contain +[^3]: + This is *easier* to type. Inline notes may contain [links](http://google.com) and `]` verbatim characters. [^4]: In quote. - [^5]: In list. - diff --git a/tests/writer.native b/tests/writer.native index bc4970e12..a35a32737 100644 --- a/tests/writer.native +++ b/tests/writer.native @@ -2,7 +2,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Str ".",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite",Str "."] , HorizontalRule , Header 1 [Str "Headers"] -, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] (Src "/url" "")] +, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")] , Header 3 [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] , Header 4 [Str "Level",Space,Str "4"] , Header 5 [Str "Level",Space,Str "5"] @@ -196,7 +196,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , Header 1 [Str "Inline",Space,Str "Markup"] , Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] , Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."] -, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] (Src "/url" "")],Str "."] +, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]] , Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Str "."] , Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]]] @@ -208,7 +208,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters",Str "."] , Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees",Str ".",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine",Str "."]] , Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go",Str "."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s?"] -, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] (Ref [Str "1"])],Str "."] +, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] , Para [Str "Some",Space,Str "dashes:",Space,Str "one",EmDash,Str "two",EmDash,Str "three",EmDash,Str "four",EmDash,Str "five",Str "."] , Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5",EnDash,Str "7,",Space,Str "255",EnDash,Str "66,",Space,Str "1987",EnDash,Str "1999",Str "."] , Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."] @@ -264,83 +264,57 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , HorizontalRule , Header 1 [Str "Links"] , Header 2 [Str "Explicit"] -, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] (Src "/url/" ""),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title preceded by two spaces"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title preceded by a tab"),Str "."] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title with \"quotes\" in it")] -, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] (Src "/url/" "title with single quotes")] -, Para [Link [Str "with",Str "_",Str "underscore"] (Src "/url/with_underscore" "")] -, Para [Link [Str "Email",Space,Str "link"] (Src "mailto:nobody@nowhere.net" "")] -, Para [Link [Str "Empty"] (Src "" ""),Str "."] +, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] +, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] +, Para [Link [Str "with",Str "_",Str "underscore"] ("/url/with_underscore","")] +, Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] +, Para [Link [Str "Empty"] ("",""),Str "."] , Header 2 [Str "Reference"] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "a"]),Str "."] -, Key [Str "a"] (Src "/url/" "") -, Para [Str "With",Space,Link [Str "embedded",Space,Str "[",Str "brackets",Str "]"] (Ref [Str "b"]),Str "."] -, Para [Link [Str "b"] (Ref [Str "b"]),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] -, Para [Str "Indented",Space,Link [Str "once"] (Ref [Str "once"]),Str "."] -, Para [Str "Indented",Space,Link [Str "twice"] (Ref [Str "twice"]),Str "."] -, Para [Str "Indented",Space,Link [Str "thrice"] (Ref [Str "thrice"]),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."] +, Para [Str "With",Space,Link [Str "embedded",Space,Str "[",Str "brackets",Str "]"] ("/url/",""),Str "."] +, Para [Link [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] +, Para [Str "Indented",Space,Link [Str "once"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "twice"] ("/url",""),Str "."] +, Para [Str "Indented",Space,Link [Str "thrice"] ("/url",""),Str "."] , Para [Str "This",Space,Str "should",Space,Str "[",Str "not",Str "]",Str "[",Str "]",Space,Str "be",Space,Str "a",Space,Str "link",Str "."] -, Key [Str "once"] (Src "/url" "") -, Key [Str "twice"] (Src "/url" "") -, Key [Str "thrice"] (Src "/url" "") , CodeBlock "[not]: /url" -, Key [Str "b"] (Src "/url/" "") -, Para [Str "Foo",Space,Link [Str "bar"] (Ref [Str "bar"]),Str "."] -, Para [Str "Foo",Space,Link [Str "biz"] (Src "/url/" "Title with \"quote\" inside"),Str "."] -, Key [Str "bar"] (Src "/url/" "Title with \"quotes\" inside") +, Para [Str "Foo",Space,Link [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] +, Para [Str "Foo",Space,Link [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] , Header 2 [Str "With",Space,Str "ampersands"] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] (Ref [Str "1"]),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] (Ref [Str "2"]),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] (Src "/script?foo=1&bar=2" ""),Str "."] -, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] (Src "/script?foo=1&bar=2" ""),Str "."] -, Key [Str "1"] (Src "http://example.com/?foo=1&bar=2" "") -, Key [Str "2"] (Src "http://att.com/" "AT&T") +, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/","AT&T"),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] +, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] , Header 2 [Str "Autolinks"] -, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] (Src "http://example.com/?foo=1&bar=2" "")] +, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] , BulletList [ [ Plain [Str "In",Space,Str "a",Space,Str "list?"] ] - , [ Plain [Link [Str "http://example.com/"] (Src "http://example.com/" "")] ] + , [ Plain [Link [Str "http://example.com/"] ("http://example.com/","")] ] , [ Plain [Str "It",Space,Str "should",Str "."] ] ] -, Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] (Src "mailto:nobody@nowhere.net" "")] +, Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] , BlockQuote - [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] (Src "http://example.com/" "")] ] + [ Para [Str "Blockquoted:",Space,Link [Str "http://example.com/"] ("http://example.com/","")] ] , Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"] , CodeBlock "or here: <http://example.com/>" , HorizontalRule , 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):"] -, Para [Image [Str "lalune"] (Ref [Str "lalune"])] -, Key [Str "lalune"] (Src "lalune.jpg" "Voyage dans la Lune") -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Src "movie.jpg" ""),Space,Str "icon",Str "."] +, Para [Image [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon",Str "."] , HorizontalRule , Header 1 [Str "Footnotes"] -, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",NoteRef "1",Space,Str "and",Space,Str "another",Str ".",NoteRef "2",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",NoteRef "3"] +, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."]],Space,Str "and",Space,Str "another",Str ".",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)",Str "."],CodeBlock " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str ".",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note",Str ".",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code "]",Space,Str "verbatim",Space,Str "characters",Str "."]]] , BlockQuote - [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",NoteRef "4"] ] + [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]] ] , OrderedList - [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",NoteRef "5"] ] - ] -, Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] -, Note "1" - [ Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote",Str ".",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference",Str ".",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document",Str "."] ] - -, Note "2" - [ Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note",Str ".",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks",Str "."] - , Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)",Str "."] - , CodeBlock " { <code> }" - , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block",Str "."] ] -, Note "3" - [ Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type",Str ".",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] (Src "http://google.com" ""),Space,Str "and",Space,Code "]",Space,Str "verbatim",Space,Str "characters",Str "."] ] - -, Note "4" - [ Para [Str "In",Space,Str "quote",Str "."] ] - -, Note "5" - [ Para [Str "In",Space,Str "list",Str "."] ] + [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] +, Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] ] diff --git a/tests/writer.rst b/tests/writer.rst index e276ac647..1a3bb764e 100644 --- a/tests/writer.rst +++ b/tests/writer.rst @@ -14,8 +14,8 @@ John Gruber's markdown test suite. Headers ======= -Level 2 with an `embedded link`_ --------------------------------- +Level 2 with an `embedded link </url>`_ +--------------------------------------- Level 3 with *emphasis* ~~~~~~~~~~~~~~~~~~~~~~~ @@ -71,11 +71,11 @@ E-mail style: Code in a block quote: :: - + sub status { print "working"; } - + A list: 1. item one @@ -97,11 +97,11 @@ Box-style: Example: :: - + sub status { print "working"; } - + 1. do laundry 2. take out the trash @@ -125,7 +125,7 @@ Code Blocks Code: :: - + ---- (should be four hyphens) sub status { @@ -133,15 +133,15 @@ Code: } this code block is indented by one tab - + And: :: - + this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ - + -------------- Lists @@ -244,9 +244,7 @@ Nested ------ - Tab - - Tab - - Tab @@ -255,7 +253,6 @@ Here's another: 1. First 2. Second: - - Fee - Fie - Foe @@ -373,17 +370,17 @@ foo This should be a code block, though: :: - + <div> foo </div> - + As should this: :: - + <div>foo</div> - + Now, nested: @@ -426,9 +423,9 @@ Multiline: Code block: :: - + <!-- Comment --> - + Just plain comment, with trailing spaces on the line: @@ -439,9 +436,9 @@ Just plain comment, with trailing spaces on the line: Code: :: - + <hr /> - + Hr's: @@ -474,7 +471,7 @@ This is *emphasized*, and so *is this*. This is **strong**, and so **is this**. -An *`emphasized link`_*. +An *`emphasized link </url>`_*. ***This is strong and em.*** @@ -499,7 +496,8 @@ Smart quotes, ellipses, dashes 'He said, "I want to go."' Were you alive in the 70's? -Here is some quoted '``code``' and a "`quoted link`_". +Here is some quoted '``code``' and a +"`quoted link <http://example.com/?foo=1&bar=2>`_". Some dashes: one--two--three--four--five. @@ -604,84 +602,88 @@ Links Explicit -------- -Just a `URL`_. +Just a `URL </url/>`_. -`URL and title`_. +`URL and title </url/>`_. -`URL and title`_. +`URL and title </url/>`_. -`URL and title`_. +`URL and title </url/>`_. -`URL and title`_ +`URL and title </url/>`_ -`URL and title`_ +`URL and title </url/>`_ -`with\_underscore`_ +`with\_underscore </url/with_underscore>`_ -`Email link`_ +`Email link <mailto:nobody@nowhere.net>`_ -`Empty`_. +`Empty <>`_. Reference --------- -Foo `bar`_. +Foo `bar </url/>`_. -Foo `bar`_. +Foo `bar </url/>`_. -Foo `bar`_. +Foo `bar </url/>`_. -With `embedded [brackets]`_. +With `embedded [brackets] </url/>`_. -`b`_ by itself should be a link. +`b </url/>`_ by itself should be a link. -Indented `once`_. +Indented `once </url>`_. -Indented `twice`_. +Indented `twice </url>`_. -Indented `thrice`_. +Indented `thrice </url>`_. This should [not][] be a link. :: - + [not]: /url - -Foo `bar`_. -Foo `biz`_. +Foo `bar </url/>`_. + +Foo `biz </url/>`_. With ampersands --------------- -Here's a `link with an ampersand in the URL`_. +Here's a +`link with an ampersand in the URL <http://example.com/?foo=1&bar=2>`_. -Here's a link with an amersand in the link text: `AT&T`_. +Here's a link with an amersand in the link text: +`AT&T <http://att.com/>`_. -Here's an `inline link`_. +Here's an `inline link </script?foo=1&bar=2>`_. -Here's an `inline link in pointy braces`_. +Here's an `inline link in pointy braces </script?foo=1&bar=2>`_. Autolinks --------- -With an ampersand: `http://example.com/?foo=1&bar=2`_ +With an ampersand: +`http://example.com/?foo=1&bar=2 <http://example.com/?foo=1&bar=2>`_ - In a list? -- `http://example.com/`_ +- `http://example.com/ <http://example.com/>`_ - It should. -An e-mail address: `nobody@nowhere.net`_ +An e-mail address: +`nobody@nowhere.net <mailto:nobody@nowhere.net>`_ - Blockquoted: `http://example.com/`_ + Blockquoted: `http://example.com/ <http://example.com/>`_ Auto-links should not occur here: ``<http://example.com/>`` :: - + or here: <http://example.com/> - + -------------- Images @@ -721,44 +723,20 @@ indented. footnote (as with list items). :: - + { <code> } - + If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. .. [3] - This is *easier* to type. Inline notes may contain `links`_ and - ``]`` verbatim characters. + This is *easier* to type. Inline notes may contain + `links <http://google.com>`_ and ``]`` verbatim characters. .. [4] In quote. .. [5] In list. -.. _embedded link: /url -.. _emphasized link: /url -.. _quoted link: http://example.com/?foo=1&bar=2 -.. _URL: /url/ -.. _URL and title: /url/ -.. _with\_underscore: /url/with_underscore -.. _Email link: mailto:nobody@nowhere.net -.. _Empty: -.. _bar: /url/ -.. _embedded [brackets]: /url/ -.. _b: /url/ -.. _once: /url -.. _twice: /url -.. _thrice: /url -.. _biz: /url/ -.. _link with an ampersand in the URL: http://example.com/?foo=1&bar=2 -.. _AT&T: http://att.com/ -.. _inline link: /script?foo=1&bar=2 -.. _inline link in pointy braces: /script?foo=1&bar=2 -.. _`http://example.com/?foo=1&bar=2`: http://example.com/?foo=1&bar=2 -.. _`http://example.com/`: http://example.com/ -.. _nobody@nowhere.net: mailto:nobody@nowhere.net .. |lalune| image:: lalune.jpg -.. |movie| image:: movie.jpg -.. _links: http://google.com - +.. |movie| image:: movie.jpg
\ No newline at end of file |