summaryrefslogtreecommitdiff
path: root/tests/rst-reader.native
blob: d5b4ba77b572e5a8287d55c9442a9e55476bd040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str "Subtitle"] [[Str "John",Space,Str "MacFarlane"],[Str "Anonymous"]] [Str "July",Space,Str "17,",Space,Str "2006"])
[ DefinitionList
  [ ([Str "Revision"],
     [ [ Plain [Str "3"] ]
     ]) ]
, Header 1 [Str "Level",Space,Str "one",Space,Str "header"]
, 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."]
, Header 2 [Str "Level",Space,Str "two",Space,Str "header"]
, Header 3 [Str "Level",Space,Str "three"]
, Header 4 [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]]
, Header 5 [Str "Level",Space,Str "five"]
, Header 1 [Str "Paragraphs"]
, Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
, Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
, Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
, Para [Str "Horizontal",Space,Str "rule",Str ":"]
, HorizontalRule
, Para [Str "Another",Str ":"]
, HorizontalRule
, Header 1 [Str "Block",Space,Str "Quotes"]
, Para [Str "Here's",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
, BlockQuote
  [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."] ]

, Para [Str "Here's",Space,Str "another,",Space,Str "differently",Space,Str "indented",Str ":"]
, BlockQuote
  [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It's",Space,Str "indented",Space,Str "with",Space,Str "a",Space,Str "tab."]
  , Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
  , CodeBlock ("",[],[]) "sub status {\n    print \"working\";\n}"
  , Para [Str "List",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"]
  , OrderedList (1,Decimal,Period)
    [ [ Plain [Str "item",Space,Str "one"] ]
    , [ Plain [Str "item",Space,Str "two"] ] ]
  , Para [Str "Nested",Space,Str "block",Space,Str "quotes",Str ":"]
  , BlockQuote
    [ Para [Str "nested"]
    , BlockQuote
      [ Para [Str "nested"] ]
     ] ]
, Header 1 [Str "Code",Space,Str "Blocks"]
, Para [Str "Code",Str ":"]
, CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n    print \"working\";\n}"
, CodeBlock ("",[],[]) "this code block is indented by one tab"
, Para [Str "And",Str ":"]
, CodeBlock ("",[],[]) "this block is indented by two tabs\n\nThese should not be escaped:  \\$ \\\\ \\> \\[ \\{"
, Para [Str "And",Str ":"]
, CodeBlock ("",["sourceCode","python"],[]) "def my_function(x):\n    return x + 1"
, Header 1 [Str "Lists"]
, Header 2 [Str "Unordered"]
, Para [Str "Asterisks",Space,Str "tight",Str ":"]
, BulletList
  [ [ Plain [Str "asterisk",Space,Str "1"] ]
  , [ Plain [Str "asterisk",Space,Str "2"] ]
  , [ Plain [Str "asterisk",Space,Str "3"] ] ]
, Para [Str "Asterisks",Space,Str "loose",Str ":"]
, BulletList
  [ [ Para [Str "asterisk",Space,Str "1"] ]
  , [ Para [Str "asterisk",Space,Str "2"] ]
  , [ Para [Str "asterisk",Space,Str "3"] ] ]
, Para [Str "Pluses",Space,Str "tight",Str ":"]
, BulletList
  [ [ Plain [Str "Plus",Space,Str "1"] ]
  , [ Plain [Str "Plus",Space,Str "2"] ]
  , [ Plain [Str "Plus",Space,Str "3"] ] ]
, Para [Str "Pluses",Space,Str "loose",Str ":"]
, BulletList
  [ [ Para [Str "Plus",Space,Str "1"] ]
  , [ Para [Str "Plus",Space,Str "2"] ]
  , [ Para [Str "Plus",Space,Str "3"] ] ]
, Para [Str "Minuses",Space,Str "tight",Str ":"]
, BulletList
  [ [ Plain [Str "Minus",Space,Str "1"] ]
  , [ Plain [Str "Minus",Space,Str "2"] ]
  , [ Plain [Str "Minus",Space,Str "3"] ] ]
, Para [Str "Minuses",Space,Str "loose",Str ":"]
, BulletList
  [ [ Para [Str "Minus",Space,Str "1"] ]
  , [ Para [Str "Minus",Space,Str "2"] ]
  , [ Para [Str "Minus",Space,Str "3"] ] ]
, Header 2 [Str "Ordered"]
, Para [Str "Tight",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Plain [Str "First"] ]
  , [ Plain [Str "Second"] ]
  , [ Plain [Str "Third"] ] ]
, Para [Str "and",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Plain [Str "One"] ]
  , [ Plain [Str "Two"] ]
  , [ Plain [Str "Three"] ] ]
, Para [Str "Loose",Space,Str "using",Space,Str "tabs",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Para [Str "First"] ]
  , [ Para [Str "Second"] ]
  , [ Para [Str "Third"] ] ]
, Para [Str "and",Space,Str "using",Space,Str "spaces",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Para [Str "One"] ]
  , [ Para [Str "Two"] ]
  , [ Para [Str "Three"] ] ]
, Para [Str "Multiple",Space,Str "paragraphs",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
    , Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog's",Space,Str "back."] ], [ Para [Str "Item",Space,Str "2."] ]
  , [ Para [Str "Item",Space,Str "3."] ] ]
, Para [Str "Nested",Str ":"]
, BulletList
  [ [ Para [Str "Tab"]
    , BulletList
      [ [ Para [Str "Tab"]
        , BulletList
          [ [ Plain [Str "Tab"] ]
         ] ] ] ] ]
, Para [Str "Here's",Space,Str "another",Str ":"]
, OrderedList (1,Decimal,Period)
  [ [ Para [Str "First"] ]
  , [ Para [Str "Second",Str ":"]
    , BlockQuote
      [ BulletList
        [ [ Plain [Str "Fee"] ]
        , [ Plain [Str "Fie"] ]
        , [ Plain [Str "Foe"] ] ] ] ], [ Para [Str "Third"] ] ]
, Header 2 [Str "Fancy",Space,Str "list",Space,Str "markers"]
, OrderedList (2,Decimal,TwoParens)
  [ [ Plain [Str "begins",Space,Str "with",Space,Str "2"] ]
  , [ Para [Str "and",Space,Str "now",Space,Str "3"]
    , Para [Str "with",Space,Str "a",Space,Str "continuation"]
    , OrderedList (4,LowerRoman,Period)
      [ [ Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ]
      , [ Para [Str "more",Space,Str "items"]
        , OrderedList (1,UpperAlpha,TwoParens)
          [ [ Plain [Str "a",Space,Str "subsublist"] ]
          , [ Plain [Str "a",Space,Str "subsublist"] ] ] ] ] ] ]
, Para [Str "Nesting",Str ":"]
, OrderedList (1,UpperAlpha,Period)
  [ [ Para [Str "Upper",Space,Str "Alpha"]
    , OrderedList (1,UpperRoman,Period)
      [ [ Para [Str "Upper",Space,Str "Roman."]
        , OrderedList (6,Decimal,TwoParens)
          [ [ Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
            , OrderedList (3,LowerAlpha,OneParen)
              [ [ Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ]
             ] ] ] ] ] ] ]
, Para [Str "Autonumbering",Str ":"]
, OrderedList (1,DefaultStyle,DefaultDelim)
  [ [ Plain [Str "Autonumber."] ]
  , [ Para [Str "More."]
    , OrderedList (1,DefaultStyle,DefaultDelim)
      [ [ Plain [Str "Nested."] ]
     ] ] ]
, Para [Str "Autonumbering",Space,Str "with",Space,Str "explicit",Space,Str "start",Str ":"]
, OrderedList (4,LowerAlpha,TwoParens)
  [ [ Plain [Str "item",Space,Str "1"] ]
  , [ Plain [Str "item",Space,Str "2"] ] ]
, Header 2 [Str "Definition"]
, DefinitionList
  [ ([Str "term",Space,Str "1"],
     [ [ Para [Str "Definition",Space,Str "1."] ]
     ])
  , ([Str "term",Space,Str "2"],
     [ [ Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "1."]
       , Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "2."] ]])
  , ([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]],
     [ [ Para [Str "Definition",Space,Str "3."] ]
     ]) ]
, Header 1 [Str "Field",Space,Str "Lists"]
, DefinitionList
  [ ([Str "address"],
     [ [ Plain [Str "61",Space,Str "Main",Space,Str "St."] ]
     ])
  , ([Str "city"],
     [ [ Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"] ]
     ])
  , ([Str "phone"],
     [ [ Plain [Str "123",Str "-",Str "4567"] ]
     ]) ]
, DefinitionList
  [ ([Str "address"],
     [ [ Plain [Str "61",Space,Str "Main",Space,Str "St."] ]
     ])
  , ([Str "city"],
     [ [ Plain [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"] ]
     ])
  , ([Str "phone"],
     [ [ Plain [Str "123",Str "-",Str "4567"] ]
     ]) ]
, Header 1 [Str "HTML",Space,Str "Blocks"]
, Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line",Str ":"]
, RawHtml "<div>foo</div>\n"
, Para [Str "Now,",Space,Str "nested",Str ":"]
, RawHtml "<div>\n    <div>\n        <div>\n            foo\n        </div>\n    </div>\n</div>\n"
, Header 1 [Str "LaTeX",Space,Str "Block"]
, Para [TeX "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog    & 2      \\\\\nCat    & 1      \\\\ \\hline\n\\end{tabular}\n"]
, Header 1 [Str "Inline",Space,Str "Markup"]
, Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."]
, Para [Str "This",Space,Str "is",Space,Str "code",Str ":",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
, Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."]
, Header 1 [Str "Special",Space,Str "Characters"]
, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode",Str ":"]
, BulletList
  [ [ Plain [Str "I",Space,Str "hat",Str ":",Space,Str "\206"] ]
  , [ Plain [Str "o",Space,Str "umlaut",Str ":",Space,Str "\246"] ]
  , [ Plain [Str "section",Str ":",Space,Str "\167"] ]
  , [ Plain [Str "set",Space,Str "membership",Str ":",Space,Str "\8712"] ]
  , [ Plain [Str "copyright",Str ":",Space,Str "\169"] ] ]
, Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
, Para [Str "This",Space,Str "&",Space,Str "that."]
, Para [Str "4",Space,Str "<",Space,Str "5."]
, Para [Str "6",Space,Str ">",Space,Str "5."]
, Para [Str "Backslash",Str ":",Space,Str "\\"]
, Para [Str "Backtick",Str ":",Space,Str "`"]
, Para [Str "Asterisk",Str ":",Space,Str "*"]
, Para [Str "Underscore",Str ":",Space,Str "_"]
, Para [Str "Left",Space,Str "brace",Str ":",Space,Str "{"]
, Para [Str "Right",Space,Str "brace",Str ":",Space,Str "}"]
, Para [Str "Left",Space,Str "bracket",Str ":",Space,Str "["]
, Para [Str "Right",Space,Str "bracket",Str ":",Space,Str "]"]
, Para [Str "Left",Space,Str "paren",Str ":",Space,Str "("]
, Para [Str "Right",Space,Str "paren",Str ":",Space,Str ")"]
, Para [Str "Greater",Str "-",Str "than",Str ":",Space,Str ">"]
, Para [Str "Hash",Str ":",Space,Str "#"]
, Para [Str "Period",Str ":",Space,Str "."]
, Para [Str "Bang",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"] ("/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"] ("lalune.jpg","")]
, Plain [Image [Str "Voyage dans la Lune"] ("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."]
, Header 1 [Str "Comments"]
, Para [Str "First",Space,Str "paragraph"]
, Para [Str "Another",Space,Str "paragraph"]
, Para [Str "A",Space,Str "third",Space,Str "paragraph"]
, Header 1 [Str "Line",Space,Str "blocks"]
, Para [Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be",LineBreak,Str "    ",Str "or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,",LineBreak,Str "        ",Str "when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,",LineBreak,Str "            ",Str "due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"]
, Para [Str "Continuation",Space,Str "line",LineBreak,Str "  ",Str "and",Space,Str "another"] ]