Multiline tests
$keepListValues on


  = a
  =>
<dl>
<dt>
a
</dt>
</dl>
  ;; assoc item w/o any delim (== or space) must have no definition (<dd>).

  1. Mandatory space after list marker:
     e.g. you see its use here.
=>
<ol>
<li style="list-style-type: decimal" value="1">
Mandatory space after list marker:     e.g. you see its use here.
</li>
</ol>
  ;; otherwise "e." would be treated as a marker for lower-alpha list.

  1. List line
     continues here.
=>
  <ol>
<li style="list-style-type: decimal" value="1">
List line     continues here.
</li>
</ol>

  1. List line here.
  and here is just an indented line.
=>
<ol>
<li style="list-style-type: decimal" value="1">
List line here.
</li>
</ol>
<p class="indent-1 default">
and here is just an indented line.
</p>

  01. Testing 0 == false, e.g. in CountLeftWhiteSpace()
  =>
<ol>
<li style="list-style-type: decimal-leading-zero" value="01">
Testing 0 == false, e.g. in CountLeftWhiteSpace()
</li>
</ol>

  1. a
  1) a
  *] a
  1] a
=>
<ol>
<li style="list-style-type: decimal" value="1">
a
</li>
<li style="list-style-type: decimal">
a
</li>
</ol>
<p class="indent-1 default">
*] a&b;
1] a
</p>

  * l
    = t == d
    = t2 d2
  1. l
=>
<ul>
<li style="list-style-type: disc">
l<dl>
<dt>
t
</dt>
<dd>
d
</dd>
<dt>
t2
</dt>
<dd>
d2
</dd>
</dl>
</li>
<li style="list-style-type: decimal" value="1">
l
</li>
</ul>

    * list item.
  =>
<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
list item.
</li>
</ul>
</li>
</ul>
  ;; there was a bug that created padding list items (when nesting levels were not continuous i.e. 1->2->3->etc.) which wasn't recognized as a proper item and an exceptions was thrown.

  * 1
    * 2
    text
  * 3
=>
<ul>
<li style="list-style-type: disc">
1<ul>
<li style="list-style-type: disc">
2
</li>
</ul>
</li>
</ul>
<p class="indent-2 default">
text
</p>
<ul>
<li style="list-style-type: disc">
3
</li>
</ul>
  ;; from human's POV "text" belongs to the list item "1" but the parser only recognizes continuations of the last item w/o taking nesting into account. Since "2" is 2nd level item and "text" doesn't have the indentation enough to count it a continuation of "2" it's counted as a regular paragraph line and the list is closed.

  a. first list marker is Latin
  i. this item is latin too!
  II. item
  h. item
  i. this item is latin too!
    =>
<ol>
<li style="list-style-type: lower-alpha" value="a">
first list marker is Latin
</li>
<li style="list-style-type: lower-alpha" value="i">
this item is latin too!
</li>
<li style="list-style-type: upper-roman" value="II">
item
</li>
<li style="list-style-type: lower-alpha" value="h">
item
</li>
<li style="list-style-type: lower-alpha" value="i">
this item is latin too!
</li>
</ol>
  ;; checking how ambiguity between i/I as Latin or Roman list marker is resolved.

  i. first list marker is Roman
  II. item
  h. item
  i. this item is Roman too!
    =>
<ol>
<li style="list-style-type: lower-roman" value="i">
first list marker is Roman
</li>
<li style="list-style-type: upper-roman" value="II">
item
</li>
<li style="list-style-type: lower-alpha" value="h">
item
</li>
<li style="list-style-type: lower-roman" value="i">
this item is Roman too!
</li>
</ol>

  i. roman.
    a. latin.
  i. roman.
    =>
<ol>
<li style="list-style-type: lower-roman" value="i">
roman.<ol>
<li style="list-style-type: lower-alpha" value="a">
latin.
</li>
</ol>
</li>
<li style="list-style-type: lower-roman">
roman.
</li>
</ol>

  a. latin.
    i. roman.
  i. latin.
    =>
<ol>
<li style="list-style-type: lower-alpha" value="a">
latin.<ol>
<li style="list-style-type: lower-roman" value="i">
roman.
</li>
</ol>
</li>
<li style="list-style-type: lower-alpha" value="i">
latin.
</li>
</ol>

  01. dec-lead-zero
  02. same
   3. no
 =>
<ol>
<li style="list-style-type: decimal-leading-zero" value="01">
dec-lead-zero
</li>
<li style="list-style-type: decimal-leading-zero" value="02">
same
</li>
<li style="list-style-type: decimal" value="3">
no
</li>
</ol>

      * 1
  * 2
=>
<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
1
</li>
</ul>
</li>
</ul>
</li>
<li style="list-style-type: disc">
2
</li>
</ul>

      * 1
      * 2
          * 3
=>
<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
1
</li>
<li style="list-style-type: disc">
2<ul>
<li style="list-style-type: disc">
<ul>
<li style="list-style-type: disc">
3
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
  ;; there was a bug that didn't behave correctly when multiple paddings (here 1>3, 3>5) were needed.

  1. list
  1. continues
  3. until
  2. a different
  99. marker
    =>
<ol>
<li style="list-style-type: decimal" value="1">
list
</li>
<li style="list-style-type: decimal">
continues
</li>
<li style="list-style-type: decimal" value="3">
until
</li>
<li style="list-style-type: decimal" value="2">
a different
</li>
<li style="list-style-type: decimal" value="99">
marker
</li>
</ol>

  1) first
  1) second
  1. still third; it doesn't matter if marker has trailing '.' or ')', they're compared by number.
  1) 4
  1. 5
  2. 2!
=>
<ol>
<li style="list-style-type: decimal" value="1">
first
</li>
<li style="list-style-type: decimal">
second
</li>
<li style="list-style-type: decimal">
still third; it doesn't matter if marker has trailing '.' or ')', they're compared by number.
</li>
<li style="list-style-type: decimal">
4
</li>
<li style="list-style-type: decimal">
5
</li>
<li style="list-style-type: decimal" value="2">
2!
</li>
</ol>

  1. 1
  a. b!
=>
<ol>
<li style="list-style-type: decimal" value="1">
1
</li>
<li style="list-style-type: lower-alpha" value="a">
b!
</li>
</ol>
  ;; changing marker value is only supported for numeric markers since HTML requires value attribute to be a number which currently isn't calculated by the markup for non-numeric markers.

  = okay
  = okay==
  = ok ay
  = ok .
  = ok==.
=>
<dl>
<dt>
okay
</dt>
<dt>
okay
</dt>
<dt>
ok
</dt>
<dd>
ay
</dd>
<dt>
ok
</dt>
<dd>
.
</dd>
<dt>
ok
</dt>
<dd>
.
</dd>
</dl>

  * abc
    def
=>
<ul>
<li style="list-style-type: disc">
abc    def
</li>
</ul>
  ;; breakListsOnNewline is off by default.

setting breakListsOnNewline 1

$keepSoftBreaks on

  * abc
    def
=>
<ul>
<li style="list-style-type: disc">
abc<br /><span class="soft-break"></span>    def
</li>
</ul>

$keepSoftBreaks off

setting breakListsOnNewline -

$keepListValues off