fix errors when no markdown options are provided #2956

edit
Hakim El Hattab 2021-05-17 10:02:05 +02:00
parent 2c115b887a
commit 632cc78873
3 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -421,10 +421,10 @@ const Plugin = () => {
deck = reveal; deck = reveal;
let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown; let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown || {};
if (!renderer) { if( !renderer ) {
let renderer = new marked.Renderer(); renderer = new marked.Renderer();
renderer.code = ( code, language ) => { renderer.code = ( code, language ) => {
@ -450,8 +450,8 @@ const Plugin = () => {
}; };
} }
if (animateLists) { if( animateLists === true ) {
renderer.listitem = (text) => `<li class="fragment">${text}</li>`; renderer.listitem = text => `<li class="fragment">${text}</li>`;
} }
marked.setOptions( { marked.setOptions( {