Since v0.9.0, Marpit will parse lists with specific markers as the fragmented list for appearing contents one by one.
CommonMark allows -
, +
, and *
as the character of bullet list marker. Marpit would parse as fragmented list if you are using *
as the marker.
# Bullet list
- One
- Two
- Three
---
# Fragmented list
* One
* Two
* Three
CommonMark's ordered list marker must have .
or )
after digits. Marpit would parse as fragmented list if you are using )
as the following character.
# Ordered list
1. One
2. Two
3. Three
---
# Fragmented list
1) One
2) Two
3) Three
A structure of rendered HTML from the fragmented list is same as the regular list. It just adds data-marpit-fragment
data attribute to list items. They would be numbered from 1 in order of recognized items.
In addition, <section>
element of the slide that has fragmented list would be added data-marpit-fragments
data attribute. It shows the number of fragmented list items of its slide.
The below HTML is a rendered result of bullet list example.
<section id="1">
<h1>Bullet list</h1>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</section>
<section id="2" data-marpit-fragments="3">
<h1>Fragmented list</h1>
<ul>
<li data-marpit-fragment="1">One</li>
<li data-marpit-fragment="2">Two</li>
<li data-marpit-fragment="3">Three</li>
</ul>
</section>
?> Fragmented list does not change DOM structure and appearances. It relies on a behavior of the integrated app whether actually treats the rendered list as fragments.