tests/test-minirst.py.out
author Matt Mackall <mpm@selenic.com>
Sat, 15 Oct 2011 00:39:01 -0500
changeset 15261 e2df5b866d22
parent 15125 bdc595059108
child 15262 e8076af14498
permissions -rw-r--r--
minirst: add basic HTML formatting support

paragraphs formatted to fit within 60 characters:
----------------------------------------------------------------------
This is some text in the first paragraph.

  A small indented paragraph. It is followed by some lines
  containing random whitespace.

The third and final paragraph.

----------------------------------------------------------------------
<p>
This is some text in the first paragraph.
</p>
<p>
A small indented paragraph.
It is followed by some lines
containing random whitespace.
</p>
<p>
The third and final paragraph.
</p>

----------------------------------------------------------------------

paragraphs formatted to fit within 30 characters:
----------------------------------------------------------------------
This is some text in the first
paragraph.

  A small indented paragraph.
  It is followed by some lines
  containing random
  whitespace.

The third and final paragraph.

----------------------------------------------------------------------
<p>
This is some text in the first paragraph.
</p>
<p>
A small indented paragraph.
It is followed by some lines
containing random whitespace.
</p>
<p>
The third and final paragraph.
</p>

----------------------------------------------------------------------

definitions formatted to fit within 60 characters:
----------------------------------------------------------------------
A Term
  Definition. The indented lines make up the definition.

Another Term
    Another definition. The final line in the definition
    determines the indentation, so this will be indented
    with four spaces.

  A Nested/Indented Term
    Definition.

----------------------------------------------------------------------
<dl>
 <dt>A Term
 <dd>Definition. The indented lines make up the definition.
 <dt>Another Term
 <dd>Another definition. The final line in the definition determines the indentation, so this will be indented with four spaces.
 <dt>A Nested/Indented Term
 <dd>Definition.
</dl>

----------------------------------------------------------------------

definitions formatted to fit within 30 characters:
----------------------------------------------------------------------
A Term
  Definition. The indented
  lines make up the
  definition.

Another Term
    Another definition. The
    final line in the
    definition determines the
    indentation, so this will
    be indented with four
    spaces.

  A Nested/Indented Term
    Definition.

----------------------------------------------------------------------
<dl>
 <dt>A Term
 <dd>Definition. The indented lines make up the definition.
 <dt>Another Term
 <dd>Another definition. The final line in the definition determines the indentation, so this will be indented with four spaces.
 <dt>A Nested/Indented Term
 <dd>Definition.
</dl>

----------------------------------------------------------------------

literals formatted to fit within 60 characters:
----------------------------------------------------------------------
The fully minimized form is the most convenient form:

  Hello
    literal
      world

In the partially minimized form a paragraph simply ends with
space-double-colon.

  ////////////////////////////////////////
  long un-wrapped line in a literal block
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

  This literal block is started with '::',
    the so-called expanded form. The paragraph
      with '::' disappears in the final output.

----------------------------------------------------------------------
<p>
The fully minimized form is the most
convenient form:
</p>
<pre>
Hello
  literal
    world
</pre>
<p>
In the partially minimized form a paragraph
simply ends with space-double-colon.
</p>
<pre>
////////////////////////////////////////
long un-wrapped line in a literal block
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
</pre>
<pre>
This literal block is started with '::',
  the so-called expanded form. The paragraph
    with '::' disappears in the final output.
</pre>

----------------------------------------------------------------------

literals formatted to fit within 30 characters:
----------------------------------------------------------------------
The fully minimized form is
the most convenient form:

  Hello
    literal
      world

In the partially minimized
form a paragraph simply ends
with space-double-colon.

  ////////////////////////////////////////
  long un-wrapped line in a literal block
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

  This literal block is started with '::',
    the so-called expanded form. The paragraph
      with '::' disappears in the final output.

----------------------------------------------------------------------
<p>
The fully minimized form is the most
convenient form:
</p>
<pre>
Hello
  literal
    world
</pre>
<p>
In the partially minimized form a paragraph
simply ends with space-double-colon.
</p>
<pre>
////////////////////////////////////////
long un-wrapped line in a literal block
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
</pre>
<pre>
This literal block is started with '::',
  the so-called expanded form. The paragraph
    with '::' disappears in the final output.
</pre>

----------------------------------------------------------------------

lists formatted to fit within 60 characters:
----------------------------------------------------------------------
- This is the first list item.

  Second paragraph in the first list item.

- List items need not be separated by a blank line.
- And will be rendered without one in any case.

We can have indented lists:

  - This is an indented list item
  - Another indented list item:

      - A literal block in the middle
            of an indented list.

      (The above is not a list item since we are in the literal block.)

  Literal block with no indentation (apart from
  the two spaces added to all literal blocks).

1. This is an enumerated list (first item).
2. Continuing with the second item.
(1) foo
(2) bar
1) Another
2) List

Line blocks are also a form of list:

This is the first line. The line continues here.
This is the second line.

----------------------------------------------------------------------
<ul>
 <li> This is the first list item.
<p>
Second paragraph in the first list item.
</p>
 <li> List items need not be separated   by a blank line.
 <li> And will be rendered without   one in any case.
</ul>
<p>
We can have indented lists:
</p>
<ul>
 <li> This is an indented list item
 <li> Another indented list item:
<pre>
- A literal block in the middle
      of an indented list.
</pre>
<pre>
(The above is not a list item since we are in the literal block.)
</pre>
</ul>
<pre>
Literal block with no indentation (apart from
the two spaces added to all literal blocks).
</pre>
<ol>
 <li> This is an enumerated list (first item).
 <li> Continuing with the second item.
 <li> foo
 <li> bar
 <li> Another
 <li> List
</ol>
<p>
Line blocks are also a form of list:
</p>
<ol>
 <li> This is the first line.   The line continues here.
 <li> This is the second line.
</ol>

----------------------------------------------------------------------

lists formatted to fit within 30 characters:
----------------------------------------------------------------------
- This is the first list item.

  Second paragraph in the
  first list item.

- List items need not be
  separated by a blank line.
- And will be rendered without
  one in any case.

We can have indented lists:

  - This is an indented list
    item
  - Another indented list
    item:

      - A literal block in the middle
            of an indented list.

      (The above is not a list item since we are in the literal block.)

  Literal block with no indentation (apart from
  the two spaces added to all literal blocks).

1. This is an enumerated list
   (first item).
2. Continuing with the second
   item.
(1) foo
(2) bar
1) Another
2) List

Line blocks are also a form of
list:

This is the first line. The
line continues here.
This is the second line.

----------------------------------------------------------------------
<ul>
 <li> This is the first list item.
<p>
Second paragraph in the first list item.
</p>
 <li> List items need not be separated   by a blank line.
 <li> And will be rendered without   one in any case.
</ul>
<p>
We can have indented lists:
</p>
<ul>
 <li> This is an indented list item
 <li> Another indented list item:
<pre>
- A literal block in the middle
      of an indented list.
</pre>
<pre>
(The above is not a list item since we are in the literal block.)
</pre>
</ul>
<pre>
Literal block with no indentation (apart from
the two spaces added to all literal blocks).
</pre>
<ol>
 <li> This is an enumerated list (first item).
 <li> Continuing with the second item.
 <li> foo
 <li> bar
 <li> Another
 <li> List
</ol>
<p>
Line blocks are also a form of list:
</p>
<ol>
 <li> This is the first line.   The line continues here.
 <li> This is the second line.
</ol>

----------------------------------------------------------------------

options formatted to fit within 60 characters:
----------------------------------------------------------------------
There is support for simple option lists, but only with long
options:

 -X --exclude filter  an option with a short and long option
                      with an argument
 -I --include         an option with both a short option and
                      a long option
    --all             Output all.
    --both            Output both (this description is quite
                      long).
    --long            Output all day long.
    --par             This option has two paragraphs in its
                      description. This is the first.

                      This is the second.  Blank lines may
                      be omitted between options (as above)
                      or left in (as here).

The next paragraph looks like an option list, but lacks the
two-space marker after the option. It is treated as a normal
paragraph:

--foo bar baz

----------------------------------------------------------------------
<p>
There is support for simple option lists,
but only with long options:
</p>
<dl>
 <dt>-X --exclude filter
 <dd>an option with a short and long option with an argument
 <dt>-I --include
 <dd>an option with both a short option and a long option
 <dt>   --all
 <dd>Output all.
 <dt>   --both
 <dd>Output both (this description is quite long).
 <dt>   --long
 <dd>Output all day long.
 <dt>   --par
 <dd>This option has two paragraphs in its description. This is the first.
<p>
This is the second.  Blank lines may be omitted between
options (as above) or left in (as here).
</p>
</dl>
<p>
The next paragraph looks like an option list, but lacks the two-space
marker after the option. It is treated as a normal paragraph:
</p>
<p>
--foo bar baz
</p>

----------------------------------------------------------------------

options formatted to fit within 30 characters:
----------------------------------------------------------------------
There is support for simple
option lists, but only with
long options:

 -X --exclude filter  an
                      option
                      with a
                      short
                      and
                      long
                      option
                      with an
                      argumen
                      t
 -I --include         an
                      option
                      with
                      both a
                      short
                      option
                      and a
                      long
                      option
    --all             Output
                      all.
    --both            Output
                      both
                      (this d
                      escript
                      ion is
                      quite
                      long).
    --long            Output
                      all day
                      long.
    --par             This
                      option
                      has two
                      paragra
                      phs in
                      its des
                      criptio
                      n. This
                      is the
                      first.

                      This is
                      the
                      second.
                      Blank
                      lines
                      may be
                      omitted
                      between
                      options
                      (as
                      above)
                      or left
                      in (as
                      here).

The next paragraph looks like
an option list, but lacks the
two-space marker after the
option. It is treated as a
normal paragraph:

--foo bar baz

----------------------------------------------------------------------
<p>
There is support for simple option lists,
but only with long options:
</p>
<dl>
 <dt>-X --exclude filter
 <dd>an option with a short and long option with an argument
 <dt>-I --include
 <dd>an option with both a short option and a long option
 <dt>   --all
 <dd>Output all.
 <dt>   --both
 <dd>Output both (this description is quite long).
 <dt>   --long
 <dd>Output all day long.
 <dt>   --par
 <dd>This option has two paragraphs in its description. This is the first.
<p>
This is the second.  Blank lines may be omitted between
options (as above) or left in (as here).
</p>
</dl>
<p>
The next paragraph looks like an option list, but lacks the two-space
marker after the option. It is treated as a normal paragraph:
</p>
<p>
--foo bar baz
</p>

----------------------------------------------------------------------

fields formatted to fit within 60 characters:
----------------------------------------------------------------------
a   First item.
ab  Second item. Indentation and wrapping is handled
    automatically.

Next list:

small       The larger key below triggers full indentation
            here.
much too large
            This key is big enough to get its own line.

----------------------------------------------------------------------
<dl>
 <dt>a
 <dd>First item.
 <dt>ab
 <dd>Second item. Indentation and wrapping is handled automatically.
</dl>
<p>
Next list:
</p>
<dl>
 <dt>small
 <dd>The larger key below triggers full indentation here.
 <dt>much too large
 <dd>This key is big enough to get its own line.
</dl>

----------------------------------------------------------------------

fields formatted to fit within 30 characters:
----------------------------------------------------------------------
a   First item.
ab  Second item. Indentation
    and wrapping is handled
    automatically.

Next list:

small       The larger key
            below triggers
            full indentation
            here.
much too large
            This key is big
            enough to get its
            own line.

----------------------------------------------------------------------
<dl>
 <dt>a
 <dd>First item.
 <dt>ab
 <dd>Second item. Indentation and wrapping is handled automatically.
</dl>
<p>
Next list:
</p>
<dl>
 <dt>small
 <dd>The larger key below triggers full indentation here.
 <dt>much too large
 <dd>This key is big enough to get its own line.
</dl>

----------------------------------------------------------------------

containers (normal) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.

----------------------------------------------------------------------
<p>
Normal output.
</p>

----------------------------------------------------------------------

containers (verbose) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.

Verbose output.

----------------------------------------------------------------------
['debug', 'debug']
----------------------------------------------------------------------
<p>
Normal output.
</p>
<p>
Verbose output.
</p>

----------------------------------------------------------------------

containers (debug) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.

Initial debug output.

----------------------------------------------------------------------
['verbose']
----------------------------------------------------------------------
<p>
Normal output.
</p>
<p>
Initial debug output.
</p>

----------------------------------------------------------------------

containers (verbose debug) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.

Initial debug output.

Verbose output.

Debug output.

----------------------------------------------------------------------
[]
----------------------------------------------------------------------
<p>
Normal output.
</p>
<p>
Initial debug output.
</p>
<p>
Verbose output.
</p>
<p>
Debug output.
</p>

----------------------------------------------------------------------

roles formatted to fit within 60 characters:
----------------------------------------------------------------------
Please see "hg add".

----------------------------------------------------------------------
<p>
Please see "hg add".
</p>

----------------------------------------------------------------------

sections formatted to fit within 20 characters:
----------------------------------------------------------------------
Title
=====

Section
-------

Subsection
''''''''''

Markup: "foo" and "hg help"
---------------------------

----------------------------------------------------------------------
<h1>Title</h1>
<h2>Section</h2>
<h3>Subsection</h3>
<h2>Markup: "foo" and "hg help"</h2>

----------------------------------------------------------------------

admonitions formatted to fit within 30 characters:
----------------------------------------------------------------------
Note:
   This is a note

   - Bullet 1
   - Bullet 2

   Warning!
      This is a warning Second
      input line of warning

!Danger!
   This is danger

----------------------------------------------------------------------
<p>
<b>Note:</b> This is a note
</p>
<ul>
 <li> Bullet 1
 <li> Bullet 2
</ul>
<p>
<b>Warning!</b> This is a warning Second input line of warning
</p>
<p>
<b>!Danger!</b> This is danger
</p>

----------------------------------------------------------------------

comments formatted to fit within 30 characters:
----------------------------------------------------------------------
Some text.

   Some indented text.

Empty comment above

----------------------------------------------------------------------
<p>
Some text.
</p>
<p>
Some indented text.
</p>
<p>
Empty comment above
</p>

----------------------------------------------------------------------

  === === ========================================
  a   b   c                                       
  === === ========================================
  1   2   3                                       
  foo bar baz this list is very very very long man
  === === ========================================

table formatted to fit within 30 characters:
----------------------------------------------------------------------
  a   b   c
  ------------------------------
  1   2   3
  foo bar baz this list is
          very very very long
          man

----------------------------------------------------------------------
<table>
 <tr><th>a</th><th>b</th><th>c</th></tr>
 <tr><td>1</td><td>2</td><td>3</td></tr>
 <tr><td>foo</td><td>bar</td><td>baz this list is very very very long man</td></tr>
</table>

----------------------------------------------------------------------