tests/test-minirst.py.out
author Na'Tosha Bard <natosha@unity3d.com>
Thu, 13 Oct 2011 15:15:32 +0200
changeset 15251 173b00827279
parent 15125 bdc595059108
child 15261 e2df5b866d22
permissions -rw-r--r--
largefiles: flush out tests to cover more operations and known cornercases
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     1
paragraphs formatted to fit within 60 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     2
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     3
This is some text in the first paragraph.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     4
9736
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
     5
  A small indented paragraph. It is followed by some lines
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
     6
  containing random whitespace.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     7
9736
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
     8
The third and final paragraph.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
     9
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    10
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    11
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    12
paragraphs formatted to fit within 30 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    13
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    14
This is some text in the first
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    15
paragraph.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    16
9736
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
    17
  A small indented paragraph.
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
    18
  It is followed by some lines
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
    19
  containing random
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
    20
  whitespace.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    21
9736
26d3ade60fa6 test-minirst: don't test on invalid reST input
Martin Geisler <mg@lazybytes.net>
parents: 9293
diff changeset
    22
The third and final paragraph.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
    23
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    24
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    25
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    26
definitions formatted to fit within 60 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    27
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    28
A Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    29
  Definition. The indented lines make up the definition.
10936
2853c891ac41 minirst: add margin around definition items
Martin Geisler <mg@lazybytes.net>
parents: 10447
diff changeset
    30
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    31
Another Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    32
    Another definition. The final line in the definition
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    33
    determines the indentation, so this will be indented
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    34
    with four spaces.
10936
2853c891ac41 minirst: add margin around definition items
Martin Geisler <mg@lazybytes.net>
parents: 10447
diff changeset
    35
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    36
  A Nested/Indented Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    37
    Definition.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
    38
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    39
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    40
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    41
definitions formatted to fit within 30 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    42
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    43
A Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    44
  Definition. The indented
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    45
  lines make up the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    46
  definition.
10936
2853c891ac41 minirst: add margin around definition items
Martin Geisler <mg@lazybytes.net>
parents: 10447
diff changeset
    47
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    48
Another Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    49
    Another definition. The
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    50
    final line in the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    51
    definition determines the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    52
    indentation, so this will
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    53
    be indented with four
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    54
    spaces.
10936
2853c891ac41 minirst: add margin around definition items
Martin Geisler <mg@lazybytes.net>
parents: 10447
diff changeset
    55
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    56
  A Nested/Indented Term
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    57
    Definition.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
    58
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    59
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    60
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    61
literals formatted to fit within 60 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    62
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    63
The fully minimized form is the most convenient form:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    64
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    65
  Hello
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    66
    literal
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    67
      world
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    68
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    69
In the partially minimized form a paragraph simply ends with
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    70
space-double-colon.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    71
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    72
  ////////////////////////////////////////
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    73
  long un-wrapped line in a literal block
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    74
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    75
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    76
  This literal block is started with '::',
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    77
    the so-called expanded form. The paragraph
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    78
      with '::' disappears in the final output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
    79
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    80
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    81
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    82
literals formatted to fit within 30 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    83
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    84
The fully minimized form is
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    85
the most convenient form:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    86
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    87
  Hello
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    88
    literal
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    89
      world
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    90
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    91
In the partially minimized
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    92
form a paragraph simply ends
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    93
with space-double-colon.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    94
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    95
  ////////////////////////////////////////
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    96
  long un-wrapped line in a literal block
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    97
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    98
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
    99
  This literal block is started with '::',
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   100
    the so-called expanded form. The paragraph
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   101
      with '::' disappears in the final output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   102
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   103
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   104
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   105
lists formatted to fit within 60 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   106
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   107
- This is the first list item.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   108
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   109
  Second paragraph in the first list item.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   110
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   111
- List items need not be separated by a blank line.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   112
- And will be rendered without one in any case.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   113
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   114
We can have indented lists:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   115
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   116
  - This is an indented list item
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   117
  - Another indented list item:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   118
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   119
      - A literal block in the middle
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   120
            of an indented list.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   121
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   122
      (The above is not a list item since we are in the literal block.)
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   123
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   124
  Literal block with no indentation (apart from
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   125
  the two spaces added to all literal blocks).
9739
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   126
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   127
1. This is an enumerated list (first item).
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   128
2. Continuing with the second item.
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   129
(1) foo
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   130
(2) bar
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   131
1) Another
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   132
2) List
10447
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   133
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   134
Line blocks are also a form of list:
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   135
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   136
This is the first line. The line continues here.
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   137
This is the second line.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   138
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   139
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   140
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   141
lists formatted to fit within 30 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   142
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   143
- This is the first list item.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   144
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   145
  Second paragraph in the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   146
  first list item.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   147
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   148
- List items need not be
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   149
  separated by a blank line.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   150
- And will be rendered without
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   151
  one in any case.
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   152
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   153
We can have indented lists:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   154
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   155
  - This is an indented list
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   156
    item
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   157
  - Another indented list
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   158
    item:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   159
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   160
      - A literal block in the middle
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   161
            of an indented list.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   162
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   163
      (The above is not a list item since we are in the literal block.)
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   164
9291
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   165
  Literal block with no indentation (apart from
cd5b6a11b607 minirst: indent literal blocks with two spaces
Martin Geisler <mg@lazybytes.net>
parents: 9156
diff changeset
   166
  the two spaces added to all literal blocks).
9739
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   167
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   168
1. This is an enumerated list
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   169
   (first item).
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   170
2. Continuing with the second
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   171
   item.
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   172
(1) foo
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   173
(2) bar
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   174
1) Another
75cff8f12910 minirst: support enumerated lists
Martin Geisler <mg@lazybytes.net>
parents: 9736
diff changeset
   175
2) List
10447
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   176
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   177
Line blocks are also a form of
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   178
list:
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   179
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   180
This is the first line. The
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   181
line continues here.
e957cc7cbd14 minirst: support line blocks
Martin Geisler <mg@lazybytes.net>
parents: 10444
diff changeset
   182
This is the second line.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   183
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   184
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   185
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   186
options formatted to fit within 60 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   187
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   188
There is support for simple option lists, but only with long
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   189
options:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   190
13011
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   191
 -X --exclude filter  an option with a short and long option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   192
                      with an argument
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   193
 -I --include         an option with both a short option and
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   194
                      a long option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   195
    --all             Output all.
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   196
    --both            Output both (this description is quite
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   197
                      long).
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   198
    --long            Output all day long.
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   199
    --par             This option has two paragraphs in its
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   200
                      description. This is the first.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   201
13011
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   202
                      This is the second.  Blank lines may
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   203
                      be omitted between options (as above)
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   204
                      or left in (as here).
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   205
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   206
The next paragraph looks like an option list, but lacks the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   207
two-space marker after the option. It is treated as a normal
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   208
paragraph:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   209
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   210
--foo bar baz
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   211
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   212
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   213
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   214
options formatted to fit within 30 characters:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   215
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   216
There is support for simple
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   217
option lists, but only with
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   218
long options:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   219
13011
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   220
 -X --exclude filter  an
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   221
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   222
                      with a
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   223
                      short
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   224
                      and
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   225
                      long
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   226
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   227
                      with an
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   228
                      argumen
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   229
                      t
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   230
 -I --include         an
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   231
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   232
                      with
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   233
                      both a
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   234
                      short
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   235
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   236
                      and a
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   237
                      long
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   238
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   239
    --all             Output
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   240
                      all.
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   241
    --both            Output
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   242
                      both
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   243
                      (this d
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   244
                      escript
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   245
                      ion is
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   246
                      quite
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   247
                      long).
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   248
    --long            Output
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   249
                      all day
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   250
                      long.
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   251
    --par             This
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   252
                      option
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   253
                      has two
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   254
                      paragra
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   255
                      phs in
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   256
                      its des
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   257
                      criptio
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   258
                      n. This
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   259
                      is the
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   260
                      first.
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   261
13011
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   262
                      This is
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   263
                      the
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   264
                      second.
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   265
                      Blank
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   266
                      lines
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   267
                      may be
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   268
                      omitted
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   269
                      between
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   270
                      options
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   271
                      (as
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   272
                      above)
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   273
                      or left
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   274
                      in (as
4936a04b6792 minirst: improved support for option lists.
Erik Zielke <ez@aragost.com>
parents: 13009
diff changeset
   275
                      here).
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   276
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   277
The next paragraph looks like
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   278
an option list, but lacks the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   279
two-space marker after the
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   280
option. It is treated as a
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   281
normal paragraph:
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   282
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   283
--foo bar baz
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   284
9156
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   285
----------------------------------------------------------------------
c9c7e8cdac9c minimal reStructuredText parser
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   286
9293
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   287
fields formatted to fit within 60 characters:
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   288
----------------------------------------------------------------------
10065
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   289
a   First item.
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   290
ab  Second item. Indentation and wrapping is handled
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   291
    automatically.
9293
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   292
10065
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   293
Next list:
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   294
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   295
small       The larger key below triggers full indentation
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   296
            here.
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   297
much too large
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   298
            This key is big enough to get its own line.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   299
9293
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   300
----------------------------------------------------------------------
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   301
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   302
fields formatted to fit within 30 characters:
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   303
----------------------------------------------------------------------
10065
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   304
a   First item.
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   305
ab  Second item. Indentation
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   306
    and wrapping is handled
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   307
    automatically.
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   308
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   309
Next list:
9293
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   310
10065
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   311
small       The larger key
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   312
            below triggers
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   313
            full indentation
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   314
            here.
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   315
much too large
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   316
            This key is big
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   317
            enough to get its
a1ae0ed78d1a minirst: improve layout of field lists
Martin Geisler <mg@lazybytes.net>
parents: 9739
diff changeset
   318
            own line.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   319
9293
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   320
----------------------------------------------------------------------
e48a48b754d3 minirst: parse field lists
Martin Geisler <mg@lazybytes.net>
parents: 9291
diff changeset
   321
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   322
containers (normal) formatted to fit within 60 characters:
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   323
----------------------------------------------------------------------
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   324
Normal output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   325
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   326
----------------------------------------------------------------------
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   327
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   328
containers (verbose) formatted to fit within 60 characters:
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   329
----------------------------------------------------------------------
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   330
Normal output.
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   331
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   332
Verbose output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   333
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   334
----------------------------------------------------------------------
10444
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   335
['debug', 'debug']
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   336
----------------------------------------------------------------------
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   337
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   338
containers (debug) formatted to fit within 60 characters:
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   339
----------------------------------------------------------------------
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   340
Normal output.
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   341
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   342
Initial debug output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   343
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   344
----------------------------------------------------------------------
10444
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   345
['verbose']
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   346
----------------------------------------------------------------------
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   347
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   348
containers (verbose debug) formatted to fit within 60 characters:
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   349
----------------------------------------------------------------------
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   350
Normal output.
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   351
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   352
Initial debug output.
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   353
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   354
Verbose output.
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   355
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   356
Debug output.
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   357
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   358
----------------------------------------------------------------------
10444
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   359
[]
e99e0e077bc4 minirst: report pruned container types
Martin Geisler <mg@lazybytes.net>
parents: 10443
diff changeset
   360
----------------------------------------------------------------------
10443
62d484a81dfe minirst: support containers
Martin Geisler <mg@lazybytes.net>
parents: 10065
diff changeset
   361
10972
0a2c6948f5f4 doc, minirst: support hg interpreted text role
Martin Geisler <mg@aragost.com>
parents: 10936
diff changeset
   362
roles formatted to fit within 60 characters:
0a2c6948f5f4 doc, minirst: support hg interpreted text role
Martin Geisler <mg@aragost.com>
parents: 10936
diff changeset
   363
----------------------------------------------------------------------
0a2c6948f5f4 doc, minirst: support hg interpreted text role
Martin Geisler <mg@aragost.com>
parents: 10936
diff changeset
   364
Please see "hg add".
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   365
10972
0a2c6948f5f4 doc, minirst: support hg interpreted text role
Martin Geisler <mg@aragost.com>
parents: 10936
diff changeset
   366
----------------------------------------------------------------------
0a2c6948f5f4 doc, minirst: support hg interpreted text role
Martin Geisler <mg@aragost.com>
parents: 10936
diff changeset
   367
10977
f4778f942a4e minirst: add test for sections
Martin Geisler <mg@lazybytes.net>
parents: 10972
diff changeset
   368
sections formatted to fit within 20 characters:
f4778f942a4e minirst: add test for sections
Martin Geisler <mg@lazybytes.net>
parents: 10972
diff changeset
   369
----------------------------------------------------------------------
10984
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   370
Title
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   371
=====
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   372
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   373
Section
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   374
-------
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   375
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   376
Subsection
68b7d2d668ce minirst: support all recommended title adornments
Martin Geisler <mg@lazybytes.net>
parents: 10983
diff changeset
   377
''''''''''
10983
287a5cdf7743 minirst: correctly format sections containing inline markup
Martin Geisler <mg@lazybytes.net>
parents: 10977
diff changeset
   378
287a5cdf7743 minirst: correctly format sections containing inline markup
Martin Geisler <mg@lazybytes.net>
parents: 10977
diff changeset
   379
Markup: "foo" and "hg help"
287a5cdf7743 minirst: correctly format sections containing inline markup
Martin Geisler <mg@lazybytes.net>
parents: 10977
diff changeset
   380
---------------------------
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   381
10977
f4778f942a4e minirst: add test for sections
Martin Geisler <mg@lazybytes.net>
parents: 10972
diff changeset
   382
----------------------------------------------------------------------
f4778f942a4e minirst: add test for sections
Martin Geisler <mg@lazybytes.net>
parents: 10972
diff changeset
   383
12388
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   384
admonitions formatted to fit within 30 characters:
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   385
----------------------------------------------------------------------
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   386
Note:
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   387
   This is a note
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   388
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   389
   - Bullet 1
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   390
   - Bullet 2
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   391
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   392
   Warning!
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   393
      This is a warning Second
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   394
      input line of warning
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   395
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   396
!Danger!
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   397
   This is danger
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   398
12388
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   399
----------------------------------------------------------------------
75f044d4dbf5 minirst: Support for admonitions
Erik Zielke <ez@aragost.com>
parents: 10984
diff changeset
   400
12819
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   401
comments formatted to fit within 30 characters:
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   402
----------------------------------------------------------------------
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   403
Some text.
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   404
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   405
   Some indented text.
13009
54be08fa4d1d minirst: modified minirst to also recognize empty comments.
Erik Zielke <ez@aragost.com>
parents: 12819
diff changeset
   406
54be08fa4d1d minirst: modified minirst to also recognize empty comments.
Erik Zielke <ez@aragost.com>
parents: 12819
diff changeset
   407
Empty comment above
15125
bdc595059108 minirst: end all blocks with newlines
Matt Mackall <mpm@selenic.com>
parents: 15039
diff changeset
   408
12819
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   409
----------------------------------------------------------------------
5082e2f3f8e0 minirst: ignore comments
Martin Geisler <mg@lazybytes.net>
parents: 12388
diff changeset
   410
15039
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   411
  === === ========================================
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   412
  a   b   c                                       
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   413
  === === ========================================
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   414
  1   2   3                                       
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   415
  foo bar baz this list is very very very long man
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   416
  === === ========================================
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   417
15037
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   418
table formatted to fit within 30 characters:
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   419
----------------------------------------------------------------------
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   420
  a   b   c
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   421
  ------------------------------
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   422
  1   2   3
15039
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   423
  foo bar baz this list is
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   424
          very very very long
c981f4a9ea74 minirst: add a helper function to build an RST table from an array
Matt Mackall <mpm@selenic.com>
parents: 15037
diff changeset
   425
          man
15037
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   426
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   427
----------------------------------------------------------------------
df47381b41d6 minirst: add simple table support
Matt Mackall <mpm@selenic.com>
parents: 13011
diff changeset
   428