1
0
Fork 0

add animateLists option to markdown plugin

Add an "animateLists" option to the markdown plugin that animates all
lists by default.
This commit is contained in:
Ujjwal Sharma 2021-05-13 20:03:09 +05:30
parent 6884741b94
commit 00acc730f0
No known key found for this signature in database
GPG Key ID: 460B292812C67D9F
1 changed files with 5 additions and 1 deletions

View File

@ -424,7 +424,7 @@ const Plugin = () => {
deck = reveal;
let { renderer, ...markedOptions } = deck.getConfig().markdown;
let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown;
if (!renderer) {
let renderer = new marked.Renderer();
@ -453,6 +453,10 @@ const Plugin = () => {
};
}
if (animateLists) {
renderer.listitem = (text) => `<li class="fragment">${text}</li>`;
}
marked.setOptions( {
renderer,
...markedOptions