From 00acc730f02223ff633072f8ec05c0d9bb130d69 Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Thu, 13 May 2021 20:03:09 +0530 Subject: [PATCH] add animateLists option to markdown plugin Add an "animateLists" option to the markdown plugin that animates all lists by default. --- plugin/markdown/plugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/markdown/plugin.js b/plugin/markdown/plugin.js index 808bc488..cc4207ad 100755 --- a/plugin/markdown/plugin.js +++ b/plugin/markdown/plugin.js @@ -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) => `
  • ${text}
  • `; + } + marked.setOptions( { renderer, ...markedOptions