fix errors when no markdown options are provided #2956
parent
2c115b887a
commit
632cc78873
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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( {
|
||||||
|
|
Loading…
Reference in New Issue