on master help sign in
Added reStructuredText reference for syntax tests
8d57482Matthieu Vion
tests/syntax-tests/highlighted/reStructuredText/reference.rstnew file+320
@@ -0,0 +1,320 @@
1+=====
2+Title
3+=====
4+
5+Subtitle
6+--------
7+Titles are underlined (or over-
8+and underlined) with a printing
9+nonalphanumeric 7-bit ASCII
10+character. Recommended choices
11+are "``= - ` : ' " ~ ^ _ * + # < >``".
12+The underline/overline must be at
13+least as long as the title text.
14+
15+A lone top-level (sub)section
16+is lifted up to be the document's
17+(sub)title.
18+
19+Inline syntaxes
20+---------------
21+
22+*emphasis* 
23+**strong emphasis**
24+`interpreted text`
25+``inline literal``
26+http://docutils.sf.net/
27+
28+Bullet lists
29+------------
30+
31+- This is item 1
32+- This is item 2
33+
34+- Bullets are "-", "*" or "+".
35+ Continuing text must be aligned
36+ after the bullet and whitespace.
37+
38+Note that a blank line is required
39+before the first item and after the
40+last, but is optional between items.
41+
42+Enumerated lists
43+----------------
44+3. This is the first item
45+4. This is the second item
46+5. Enumerators are arabic numbers,
47+ single letters, or roman numerals
48+6. List items should be sequentially
49+ numbered, but need not start at 1
50+ (although not all formatters will
51+ honour the first index).
52+#. This item is auto-enumerated
53+
54+Definition lists
55+----------------
56+
57+what
58+ Definition lists associate a term with
59+ a definition.
60+
61+how
62+ The term is a one-line phrase, and the
63+ definition is one or more paragraphs or
64+ body elements, indented relative to the
65+ term. Blank lines are not allowed
66+ between term and definition.
67+
68+Field lists
69+-----------
70+:Authors:
71+ Tony J. (Tibs) Ibbs,
72+ David Goodger
73+ (and sundry other good-natured folks)
74+
75+:Version: 1.0 of 2001/08/08
76+:Dedication: To my father.
77+
78+Options lists
79+-------------
80+-a command-line option "a"
81+-b file options can have arguments
82+ and long descriptions
83+--long options can be long also
84+--input=file long options can also have
85+ arguments
86+/V DOS/VMS-style options too
87+
88+Literal Blocks
89+--------------
90+
91+A paragraph containing only two colons
92+indicates that the following indented
93+or quoted text is a literal block.
94+
95+::
96+
97+ Whitespace, newlines, blank lines, and
98+ all kinds of markup (like *this* or
99+ \this) is preserved by literal blocks.
100+
101+ The paragraph containing only '::'
102+ will be omitted from the result.
103+
104+The ``::`` may be tacked onto the very
105+end of any paragraph. The ``::`` will be
106+omitted if it is preceded by whitespace.
107+The ``::`` will be converted to a single
108+colon if preceded by text, like this::
109+
110+ It's very convenient to use this form.
111+
112+Literal blocks end when text returns to
113+the preceding paragraph's indentation.
114+This means that something like this
115+is possible::
116+
117+ We start here
118+ and continue here
119+ and end here.
120+
121+Per-line quoting can also be used on
122+unindented literal blocks::
123+
124+> Useful for quotes from email and
125+> for Haskell literate programming.
126+
127+Line blocks
128+-----------
129+
130+A paragraph containing only two colons
131+indicates that the following indented
132+or quoted text is a literal block.
133+
134+::
135+
136+ Whitespace, newlines, blank lines, and
137+ all kinds of markup (like *this* or
138+ \this) is preserved by literal blocks.
139+
140+ The paragraph containing only '::'
141+ will be omitted from the result.
142+
143+The ``::`` may be tacked onto the very
144+end of any paragraph. The ``::`` will be
145+omitted if it is preceded by whitespace.
146+The ``::`` will be converted to a single
147+colon if preceded by text, like this::
148+
149+ It's very convenient to use this form.
150+
151+Literal blocks end when text returns to
152+the preceding paragraph's indentation.
153+This means that something like this
154+is possible::
155+
156+ We start here
157+ and continue here
158+ and end here.
159+
160+Per-line quoting can also be used on
161+unindented literal blocks::
162+
163+> Useful for quotes from email and
164+> for Haskell literate programming.
165+
166+Block quotes
167+------------
168+
169+Block quotes are just:
170+ Indented paragraphs,
171+
172+ and they may nest.
173+
174+Doctest blocks
175+--------------
176+Doctest blocks are interactive
177+Python sessions. They begin with
178+"``>>>``" and end with a blank line.
179+
180+>>> print "This is a doctest block."
181+This is a doctest block.
182+
183+Tables
184+------
185+
186+Grid table:
187+
188++------------+------------+-----------+
189+| Header 1 | Header 2 | Header 3 |
190++============+============+===========+
191+| body row 1 | column 2 | column 3 |
192++------------+------------+-----------+
193+| body row 2 | Cells may span columns.|
194++------------+------------+-----------+
195+| body row 3 | Cells may | - Cells |
196++------------+ span rows. | - contain |
197+| body row 4 | | - blocks. |
198++------------+------------+-----------+
199+
200+Simple table:
201+
202+===== ===== ======
203+ Inputs Output
204+------------ ------
205+ A B A or B
206+===== ===== ======
207+False False False
208+True False True
209+False True True
210+True True True
211+===== ===== ======
212+
213+Transitions
214+-----------
215+
216+A transition marker is a horizontal line
217+of 4 or more repeated punctuation
218+characters.
219+
220+------------
221+
222+A transition should not begin or end a
223+section or document, nor should two
224+transitions be immediately adjacent.
225+
226+Footnotes
227+---------
228+
229+Footnote references, like [5]_.
230+Note that footnotes may get
231+rearranged, e.g., to the bottom of
232+the "page".
233+.. [5] A numerical footnote. Note there's no colon after the ``]``.
234+
235+Autonumbered footnotes are
236+possible, like using [#]_ and [#]_.
237+.. [#] This is the first one.
238+.. [#] This is the second one.
239+
240+They may be assigned 'autonumber
241+labels' - for instance,
242+[#fourth]_ and [#third]_.
243+
244+.. [#third] a.k.a. third_
245+
246+.. [#fourth] a.k.a. fourth_
247+
248+Auto-symbol footnotes are also
249+possible, like this: [*]_ and [*]_.
250+.. [*] This is the first one.
251+.. [*] This is the second one.
252+
253+Citations
254+---------
255+
256+Citation references, like [CIT2002]_.
257+Note that citations may get
258+rearranged, e.g., to the bottom of
259+the "page".
260+
261+.. [CIT2002] A citation (as often used in journals).
262+
263+Citation labels contain alphanumerics,
264+underlines, hyphens and fullstops.
265+Case is not significant.
266+
267+Given a citation like [this]_, one
268+can also refer to it like this_.
269+
270+.. [this] here.
271+
272+Hyperlink Targets
273+-----------------
274+
275+External hyperlinks, like Python_.
276+.. _Python: http://www.python.org/
277+
278+External hyperlinks, like `Python
279+<http://www.python.org/>`_.
280+
281+Internal crossreferences, like example_.
282+.. _example:
283+
284+This is an example crossreference target.
285+
286+Python_ is `my favourite
287+programming language`__.
288+.. _Python: http://www.python.org/
289+
290+__ Python_
291+
292+Titles are targets, too
293+=======================
294+Implict references, like `Titles are
295+targets, too`_.
296+
297+Directives
298+----------
299+
300+For instance:
301+.. image:: images/ball1.gif
302+
303+The |biohazard| symbol must be used on containers used to dispose of medical waste.
304+.. |biohazard| image:: biohazard.png
305+
306+Comments
307+--------
308+
309+.. This text will not be shown
310+ (but, for instance, in HTML might be
311+ rendered as an HTML comment)
312+
313+An "empty comment" does not
314+consume following blocks.
315+(An empty comment is ".." with
316+blank lines before and after.)
317+..
318+
319+ So this block is not "lost",
320+ despite its indentation.
tests/syntax-tests/source/reStructuredText/reference.rstnew file+320
@@ -0,0 +1,320 @@
1+=====
2+Title
3+=====
4+
5+Subtitle
6+--------
7+Titles are underlined (or over-
8+and underlined) with a printing
9+nonalphanumeric 7-bit ASCII
10+character. Recommended choices
11+are "``= - ` : ' " ~ ^ _ * + # < >``".
12+The underline/overline must be at
13+least as long as the title text.
14+
15+A lone top-level (sub)section
16+is lifted up to be the document's
17+(sub)title.
18+
19+Inline syntaxes
20+---------------
21+
22+*emphasis*
23+**strong emphasis**
24+`interpreted text`
25+``inline literal``
26+http://docutils.sf.net/
27+
28+Bullet lists
29+------------
30+
31+- This is item 1
32+- This is item 2
33+
34+- Bullets are "-", "*" or "+".
35+ Continuing text must be aligned
36+ after the bullet and whitespace.
37+
38+Note that a blank line is required
39+before the first item and after the
40+last, but is optional between items.
41+
42+Enumerated lists
43+----------------
44+3. This is the first item
45+4. This is the second item
46+5. Enumerators are arabic numbers,
47+ single letters, or roman numerals
48+6. List items should be sequentially
49+ numbered, but need not start at 1
50+ (although not all formatters will
51+ honour the first index).
52+#. This item is auto-enumerated
53+
54+Definition lists
55+----------------
56+
57+what
58+ Definition lists associate a term with
59+ a definition.
60+
61+how
62+ The term is a one-line phrase, and the
63+ definition is one or more paragraphs or
64+ body elements, indented relative to the
65+ term. Blank lines are not allowed
66+ between term and definition.
67+
68+Field lists
69+-----------
70+:Authors:
71+ Tony J. (Tibs) Ibbs,
72+ David Goodger
73+ (and sundry other good-natured folks)
74+
75+:Version: 1.0 of 2001/08/08
76+:Dedication: To my father.
77+
78+Options lists
79+-------------
80+-a command-line option "a"
81+-b file options can have arguments
82+ and long descriptions
83+--long options can be long also
84+--input=file long options can also have
85+ arguments
86+/V DOS/VMS-style options too
87+
88+Literal Blocks
89+--------------
90+
91+A paragraph containing only two colons
92+indicates that the following indented
93+or quoted text is a literal block.
94+
95+::
96+
97+ Whitespace, newlines, blank lines, and
98+ all kinds of markup (like *this* or
99+ \this) is preserved by literal blocks.
100+
101+ The paragraph containing only '::'
102+ will be omitted from the result.
103+
104+The ``::`` may be tacked onto the very
105+end of any paragraph. The ``::`` will be
106+omitted if it is preceded by whitespace.
107+The ``::`` will be converted to a single
108+colon if preceded by text, like this::
109+
110+ It's very convenient to use this form.
111+
112+Literal blocks end when text returns to
113+the preceding paragraph's indentation.
114+This means that something like this
115+is possible::
116+
117+ We start here
118+ and continue here
119+ and end here.
120+
121+Per-line quoting can also be used on
122+unindented literal blocks::
123+
124+> Useful for quotes from email and
125+> for Haskell literate programming.
126+
127+Line blocks
128+-----------
129+
130+A paragraph containing only two colons
131+indicates that the following indented
132+or quoted text is a literal block.
133+
134+::
135+
136+ Whitespace, newlines, blank lines, and
137+ all kinds of markup (like *this* or
138+ \this) is preserved by literal blocks.
139+
140+ The paragraph containing only '::'
141+ will be omitted from the result.
142+
143+The ``::`` may be tacked onto the very
144+end of any paragraph. The ``::`` will be
145+omitted if it is preceded by whitespace.
146+The ``::`` will be converted to a single
147+colon if preceded by text, like this::
148+
149+ It's very convenient to use this form.
150+
151+Literal blocks end when text returns to
152+the preceding paragraph's indentation.
153+This means that something like this
154+is possible::
155+
156+ We start here
157+ and continue here
158+ and end here.
159+
160+Per-line quoting can also be used on
161+unindented literal blocks::
162+
163+> Useful for quotes from email and
164+> for Haskell literate programming.
165+
166+Block quotes
167+------------
168+
169+Block quotes are just:
170+ Indented paragraphs,
171+
172+ and they may nest.
173+
174+Doctest blocks
175+--------------
176+Doctest blocks are interactive
177+Python sessions. They begin with
178+"``>>>``" and end with a blank line.
179+
180+>>> print "This is a doctest block."
181+This is a doctest block.
182+
183+Tables
184+------
185+
186+Grid table:
187+
188++------------+------------+-----------+
189+| Header 1 | Header 2 | Header 3 |
190++============+============+===========+
191+| body row 1 | column 2 | column 3 |
192++------------+------------+-----------+
193+| body row 2 | Cells may span columns.|
194++------------+------------+-----------+
195+| body row 3 | Cells may | - Cells |
196++------------+ span rows. | - contain |
197+| body row 4 | | - blocks. |
198++------------+------------+-----------+
199+
200+Simple table:
201+
202+===== ===== ======
203+ Inputs Output
204+------------ ------
205+ A B A or B
206+===== ===== ======
207+False False False
208+True False True
209+False True True
210+True True True
211+===== ===== ======
212+
213+Transitions
214+-----------
215+
216+A transition marker is a horizontal line
217+of 4 or more repeated punctuation
218+characters.
219+
220+------------
221+
222+A transition should not begin or end a
223+section or document, nor should two
224+transitions be immediately adjacent.
225+
226+Footnotes
227+---------
228+
229+Footnote references, like [5]_.
230+Note that footnotes may get
231+rearranged, e.g., to the bottom of
232+the "page".
233+.. [5] A numerical footnote. Note there's no colon after the ``]``.
234+
235+Autonumbered footnotes are
236+possible, like using [#]_ and [#]_.
237+.. [#] This is the first one.
238+.. [#] This is the second one.
239+
240+They may be assigned 'autonumber
241+labels' - for instance,
242+[#fourth]_ and [#third]_.
243+
244+.. [#third] a.k.a. third_
245+
246+.. [#fourth] a.k.a. fourth_
247+
248+Auto-symbol footnotes are also
249+possible, like this: [*]_ and [*]_.
250+.. [*] This is the first one.
251+.. [*] This is the second one.
252+
253+Citations
254+---------
255+
256+Citation references, like [CIT2002]_.
257+Note that citations may get
258+rearranged, e.g., to the bottom of
259+the "page".
260+
261+.. [CIT2002] A citation (as often used in journals).
262+
263+Citation labels contain alphanumerics,
264+underlines, hyphens and fullstops.
265+Case is not significant.
266+
267+Given a citation like [this]_, one
268+can also refer to it like this_.
269+
270+.. [this] here.
271+
272+Hyperlink Targets
273+-----------------
274+
275+External hyperlinks, like Python_.
276+.. _Python: http://www.python.org/
277+
278+External hyperlinks, like `Python
279+<http://www.python.org/>`_.
280+
281+Internal crossreferences, like example_.
282+.. _example:
283+
284+This is an example crossreference target.
285+
286+Python_ is `my favourite
287+programming language`__.
288+.. _Python: http://www.python.org/
289+
290+__ Python_
291+
292+Titles are targets, too
293+=======================
294+Implict references, like `Titles are
295+targets, too`_.
296+
297+Directives
298+----------
299+
300+For instance:
301+.. image:: images/ball1.gif
302+
303+The |biohazard| symbol must be used on containers used to dispose of medical waste.
304+.. |biohazard| image:: biohazard.png
305+
306+Comments
307+--------
308+
309+.. This text will not be shown
310+ (but, for instance, in HTML might be
311+ rendered as an HTML comment)
312+
313+An "empty comment" does not
314+consume following blocks.
315+(An empty comment is ".." with
316+blank lines before and after.)
317+..
318+
319+ So this block is not "lost",
320+ despite its indentation.