Lists

SPLDOC supports markup for ordered and unordered lists. You can use this markup to create lists, nest lists within other lists, and embed paragraphs and code blocks in lists.

To embed another item within a list item, the embedded item must be indented relative to the markup of the first line of the enclosing list.

In SPL files, the encoding for unordered lists requires a comment decorator ( * ) at the beginning of each comment line.

Markup for unordered lists
Each item in an unordered list is preceded by one asterisk ( * ) that is followed by a space.
* Item red
* Item blue
* Item green
The spl-make-doc command generates HTML similar to this code.
<ul>
<li> Item red
</li>
<li> Item blue
</li>
<li> Item green
<li>
</ul>
Markup for ordered lists
Each item in an ordered list is preceded by a number that is followed by a period and then a space ( 1. ).
1. Item 1
2. Item 2
3. Item 3
2. Item 1
1. Item 2
3. Item 3 
The spl-make-doc command generates HTML for either of the marked up ordered lists.
<ol>
<li> Item 1
</li>
<li> Item 2
</li>
<li> Item 3
</li>
</ol>
Markup for nested lists
Lists are nested by indenting a list item. Ordered lists can be nested in unordered lists, and unordered lists can be nested in ordered lists.
/**
* An example of a nested list:
*
* * Cars
*    * Electric
*    * Hybrid
*    * Gas
* * Boats
*    * Sail
*    * Motor
* * Train
*    * Diesel
*      * Passenger
*      * Freight
*    * Electric
*/ 
The spl-make-doc command generates HTML for the nested list.
<ul>
<li> Cars
<ul>
<li> Electric </li>
<li> Hybrid </li>
<li> Gas </li>
</ul>
</li>
<li> Boats
<ul>
<li> Sail </li>
<li> Motor </li>
</ul>
</li>
<li> Train
<ul>
<li> Diesel
<ul class="ul">
<li> Passenger </li>
<li> Freight </li>
</ul>
</li>
<li> Electric </li>
</ul>
</li>
</ul>
Markup for unordered lists in SPL files
In an SPL file, the encoding for an unordered list requires the asterisk ( * ) decorator at the beginning of each line in the comment.
/**
 * * Item red
 * * Item blue
 * * Item green
 */
If the decorator is not added at the beginning of each comment line, the list item is interpreted as a decorator and is trimmed when the document is generated.
/**
 * Item red
 * Item blue
 * Item green
 */
If the decorator is not added at the beginning of each comment line, the spl-make-doc command generates HTML similar to this code.
<p> Item red Item blue Item green
</p>