move markdown default options to top level #3443

This commit is contained in:
Hakim El Hattab
2023-08-06 13:55:00 +02:00
parent f4e1a8ef50
commit da5682ce51
3 changed files with 10 additions and 10 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -95,12 +95,12 @@ const Plugin = () => {
* values for what's not defined. * values for what's not defined.
*/ */
function getSlidifyOptions( options ) { function getSlidifyOptions( options ) {
const userDefaultOptions = deck.getConfig().markdown?.defaultOptions; const markdownConfig = deck.getConfig().markdown;
options = options || {}; options = options || {};
options.separator = options.separator || userDefaultOptions?.separator || DEFAULT_SLIDE_SEPARATOR; options.separator = options.separator || markdownConfig?.separator || DEFAULT_SLIDE_SEPARATOR;
options.verticalSeparator = options.verticalSeparator || userDefaultOptions?.verticalSeparator || DEFAULT_VERTICAL_SEPARATOR; options.verticalSeparator = options.verticalSeparator || markdownConfig?.verticalSeparator || DEFAULT_VERTICAL_SEPARATOR;
options.notesSeparator = options.notesSeparator || userDefaultOptions?.notesSeparator || DEFAULT_NOTES_SEPARATOR; options.notesSeparator = options.notesSeparator || markdownConfig?.notesSeparator || DEFAULT_NOTES_SEPARATOR;
options.attributes = options.attributes || ''; options.attributes = options.attributes || '';
return options; return options;
@@ -426,7 +426,7 @@ const Plugin = () => {
deck = reveal; deck = reveal;
let { renderer, animateLists, defaultOptions, ...markedOptions } = deck.getConfig().markdown || {}; let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown || {};
if( !renderer ) { if( !renderer ) {
renderer = new marked.Renderer(); renderer = new marked.Renderer();