summaryrefslogtreecommitdiff
path: root/tests/textile-reader.native
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-10-29 22:45:52 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-09 09:30:05 -0800
commitd599c4cdabd0d71fd9d27161c949b5e1e692436d (patch)
tree96b6130be929282f85d0261bbb0e0ef37e4e43ff /tests/textile-reader.native
parent7a40fa8c08996cb94e7ff3cfafd8ede84972ce70 (diff)
Added Attr field to Header.
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
Diffstat (limited to 'tests/textile-reader.native')
-rw-r--r--tests/textile-reader.native58
1 files changed, 29 insertions, 29 deletions
diff --git a/tests/textile-reader.native b/tests/textile-reader.native
index 575aefdf9..a97869f06 100644
--- a/tests/textile-reader.native
+++ b/tests/textile-reader.native
@@ -1,13 +1,13 @@
Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
[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 "Textile",Space,Str "Reader",Str ".",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber",Str "\8217",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 "embeded",Space,Str "link"] ("http://www.example.com","")]
-,Header 3 [Str "Level",Space,Str "3",Space,Str "with",Space,Strong [Str "emphasis"]]
-,Header 4 [Str "Level",Space,Str "4"]
-,Header 5 [Str "Level",Space,Str "5"]
-,Header 6 [Str "Level",Space,Str "6"]
-,Header 1 [Str "Paragraphs"]
+,Header 1 ("",[],[]) [Str "Headers"]
+,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embeded",Space,Str "link"] ("http://www.example.com","")]
+,Header 3 ("",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Strong [Str "emphasis"]]
+,Header 4 ("",[],[]) [Str "Level",Space,Str "4"]
+,Header 5 ("",[],[]) [Str "Level",Space,Str "5"]
+,Header 6 ("",[],[]) [Str "Level",Space,Str "6"]
+,Header 1 ("",[],[]) [Str "Paragraphs"]
,Para [Str "Here",Str "\8217",Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph",Str "."]
,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile",Str ",",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break",Str "."]
,Para [Str "Here",Str "\8217",Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet",Str "."]
@@ -16,23 +16,23 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
,Para [Str "and",Space,Str "here",Str "."]
,Para [Str "pandoc",Space,Str "converts",Space,Str "textile",Str "."]
-,Header 1 [Str "Block",Space,Str "Quotes"]
+,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
,BlockQuote
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody",Str ".",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say",Str ",",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines",Str "."]]
,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph",Str "."]
-,Header 1 [Str "Code",Space,Str "Blocks"]
+,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
,Para [Str "Code",Str ":"]
,CodeBlock ("",[],[]) " ---- (should be four hyphens)\n\n sub status {\n print \"working\";\n }\n\n this code block is indented by one tab"
,Para [Str "And",Str ":"]
,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\\n"
,Para [Str "Inline",Space,Str "code",Str ":",Space,Code ("",[],[]) "<tt>",Str ",",Space,Code ("",[],[]) "@",Str "."]
-,Header 1 [Str "Notextile"]
+,Header 1 ("",[],[]) [Str "Notextile"]
,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"]
,Para [Str "\nNo *bold* and\n* no bullet\n"]
,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup",Str "."]
-,Header 1 [Str "Lists"]
-,Header 2 [Str "Unordered"]
+,Header 1 ("",[],[]) [Str "Lists"]
+,Header 2 ("",[],[]) [Str "Unordered"]
,Para [Str "Asterisks",Space,Str "tight",Str ":"]
,BulletList
[[Plain [Str "asterisk",Space,Str "1"]]
@@ -42,13 +42,13 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,BulletList
[[Plain [Str "asterisk",Space,Str "1",LineBreak,Str "newline"]]
,[Plain [Str "asterisk",Space,Str "2"]]]
-,Header 2 [Str "Ordered"]
+,Header 2 ("",[],[]) [Str "Ordered"]
,Para [Str "Tight",Str ":"]
,OrderedList (1,DefaultStyle,DefaultDelim)
[[Plain [Str "First"]]
,[Plain [Str "Second"]]
,[Plain [Str "Third"]]]
-,Header 2 [Str "Nested"]
+,Header 2 ("",[],[]) [Str "Nested"]
,BulletList
[[Plain [Str "ui",Space,Str "1"]
,BulletList
@@ -63,7 +63,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,BulletList
[[Plain [Str "ui",Space,Str "2",Str ".",Str "1",Str ".",Str "1"]]
,[Plain [Str "ui",Space,Str "2",Str ".",Str "1",Str ".",Str "2"]]]]]]]
-,Header 2 [Str "Definition",Space,Str "List"]
+,Header 2 ("",[],[]) [Str "Definition",Space,Str "List"]
,DefinitionList
[([Str "coffee"],
[[Plain [Str "Hot",Space,Str "and",Space,Str "black"]]])
@@ -74,23 +74,23 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,Para [Str "Cold",Space,Str "drink",Space,Str "that",Space,Str "goes",Space,Str "great",Space,Str "with",Space,Str "cookies",Str "."]]])
,([Str "beer"],
[[Plain [Str "fresh",Space,Str "and",Space,Str "bitter"]]])]
-,Header 1 [Str "Inline",Space,Str "Markup"]
+,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 ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "Hyphenated-words-are-ok",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "strange_underscore_notation",Str ".",LineBreak,Str "A",Space,Link [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."]
,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em",Str "."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]]
,Para [Str "Superscripts",Str ":",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts",Str ":",Space,Subscript [Str "here"],Space,Str "H",Subscript [Str "2"],Str "O",Str ",",Space,Str "H",Subscript [Str "23"],Str "O",Str ",",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O",Str "."]
,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes",Str "."]
,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more",Str "."]
,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I",Str "\8217",Str "d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example",Str "."]
-,Header 1 [Str "Links"]
-,Header 2 [Str "Explicit"]
+,Header 1 ("",[],[]) [Str "Links"]
+,Header 2 ("",[],[]) [Str "Explicit"]
,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",""),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 "."]
,Para [Str "A",Space,Str "link",Link [Str "with",Space,Str "brackets"] ("http://www.example.com",""),Str "and",Space,Str "no",Space,Str "spaces",Str "."]
-,Header 1 [Str "Tables"]
+,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"]
+,Header 2 ("",[],[]) [Str "Without",Space,Str "headers"]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
[]
[[[Plain [Str "name"]]
@@ -106,7 +106,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,[Plain [Str "45"]]
,[Plain [Str "f"]]]]
,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"]
-,Header 2 [Str "With",Space,Str "headers"]
+,Header 2 ("",[],[]) [Str "With",Space,Str "headers"]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
[[Plain [Str "name"]]
,[Plain [Str "age"]]
@@ -120,10 +120,10 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,[[Plain [Str "bella"]]
,[Plain [Str "45"]]
,[Plain [Str "f"]]]]
-,Header 1 [Str "Images"]
+,Header 1 ("",[],[]) [Str "Images"]
,Para [Str "Textile",Space,Str "inline",Space,Str "image",Space,Str "syntax",Str ",",Space,Str "like",Space,LineBreak,Str "here",Space,Image [Str "this is the alt text"] ("this_is_an_image.png","this is the alt text"),LineBreak,Str "and",Space,Str "here",Space,Image [Str ""] ("this_is_an_image.png",""),Str "."]
-,Header 1 [Str "Attributes"]
-,Header 2 [Str "HTML",Space,Str "and",Space,Str "CSS",Space,Str "attributes",Space,Str "are",Space,Str "ignored"]
+,Header 1 ("",[],[]) [Str "Attributes"]
+,Header 2 ("",[],[]) [Str "HTML",Space,Str "and",Space,Str "CSS",Space,Str "attributes",Space,Str "are",Space,Str "ignored"]
,Para [Str "as",Space,Str "well",Space,Str "as",Space,Strong [Str "inline",Space,Str "attributes"],Space,Str "of",Space,Str " all kind"]
,Para [Str "and",Space,Str "paragraph",Space,Str "attributes",Str ",",Space,Str "and",Space,Str "table",Space,Str "attributes",Str "."]
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
@@ -134,7 +134,7 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
,[[Plain [Str "joan"]]
,[Plain [Str "24"]]
,[Plain [Str "f"]]]]
-,Header 1 [Str "Raw",Space,Str "HTML"]
+,Header 1 ("",[],[]) [Str "Raw",Space,Str "HTML"]
,Para [Str "However",Str ",",Space,RawInline "html" "<strong>",Space,Str "raw",Space,Str "HTML",Space,Str "inlines",Space,RawInline "html" "</strong>",Space,Str "are",Space,Str "accepted",Str ",",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str ":"]
,RawBlock "html" "<div class=\"foobar\">"
,Para [Str "any",Space,Strong [Str "Raw",Space,Str "HTML",Space,Str "Block"],Space,Str "with",Space,Str "bold",LineBreak]
@@ -148,18 +148,18 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
[[Plain [Str "this",Space,Str "<",Str "div",Str ">",Space,Str "won",Str "\8217",Str "t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,Str "<",Str "/div",Str ">"]]
,[Plain [Str "but",Space,Str "this",Space,RawInline "html" "<strong>",Space,Str "will",Space,Str "produce",Space,Str "inline",Space,Str "html",Space,RawInline "html" "</strong>"]]]
,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"]
-,Header 1 [Str "Raw",Space,Str "LaTeX"]
+,Header 1 ("",[],[]) [Str "Raw",Space,Str "LaTeX"]
,Para [Str "This",Space,Str "Textile",Space,Str "reader",Space,Str "also",Space,Str "accepts",Space,Str "raw",Space,Str "LaTeX",Space,Str "for",Space,Str "blocks",Space,Str ":"]
,RawBlock "latex" "\\begin{itemize}\n \\item one\n \\item two\n\\end{itemize}"
,Para [Str "and",Space,Str "for",Space,RawInline "latex" "\\emph{inlines}",Str "."]
-,Header 1 [Str "Acronyms",Space,Str "and",Space,Str "marks"]
+,Header 1 ("",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"]
,Para [Str "PBS (Public Broadcasting System)"]
,Para [Str "Hi",Str "\8482"]
,Para [Str "Hi",Space,Str "\8482"]
,Para [Str "\174",Space,Str "Hi",Str "\174"]
,Para [Str "Hi",Str "\169",Str "2008",Space,Str "\169",Space,Str "2008"]
-,Header 1 [Str "Footnotes"]
+,Header 1 ("",[],[]) [Str "Footnotes"]
,Para [Str "A",Space,Str "note",Str ".",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here",Str "!"]],Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note",Str "."]],Str "."]
-,Header 1 [Str "Comment",Space,Str "blocks"]
+,Header 1 ("",[],[]) [Str "Comment",Space,Str "blocks"]
,Null
,Para [Str "not",Space,Str "a",Space,Str "comment",Str "."]]