Visitar URL original
add animateLists option to markdown plugin · hakimel/reveal.js@00acc73 · GitHub
Skip to content

Commit 00acc73

Browse files
committed
add animateLists option to markdown plugin
Add an "animateLists" option to the markdown plugin that animates all lists by default.
1 parent 6884741 commit 00acc73

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎plugin/markdown/plugin.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ const Plugin = () => {
424424

425425
deck = reveal;
426426

427-
let { renderer, ...markedOptions } = deck.getConfig().markdown;
427+
let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown;
428428

429429
if (!renderer) {
430430
let renderer = new marked.Renderer();
@@ -453,6 +453,10 @@ const Plugin = () => {
453453
};
454454
}
455455

456+
if (animateLists) {
457+
renderer.listitem = (text) => `<li class="fragment">${text}</li>`;
458+
}
459+
456460
marked.setOptions( {
457461
renderer,
458462
...markedOptions

0 commit comments

Comments
 (0)