mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-01-17 05:18:27 +01:00
move markdown default options to top level #3443
This commit is contained in:
parent
f4e1a8ef50
commit
da5682ce51
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -95,12 +95,12 @@ const Plugin = () => {
|
||||
* values for what's not defined.
|
||||
*/
|
||||
function getSlidifyOptions( options ) {
|
||||
const userDefaultOptions = deck.getConfig().markdown?.defaultOptions;
|
||||
const markdownConfig = deck.getConfig().markdown;
|
||||
|
||||
options = options || {};
|
||||
options.separator = options.separator || userDefaultOptions?.separator || DEFAULT_SLIDE_SEPARATOR;
|
||||
options.verticalSeparator = options.verticalSeparator || userDefaultOptions?.verticalSeparator || DEFAULT_VERTICAL_SEPARATOR;
|
||||
options.notesSeparator = options.notesSeparator || userDefaultOptions?.notesSeparator || DEFAULT_NOTES_SEPARATOR;
|
||||
options.separator = options.separator || markdownConfig?.separator || DEFAULT_SLIDE_SEPARATOR;
|
||||
options.verticalSeparator = options.verticalSeparator || markdownConfig?.verticalSeparator || DEFAULT_VERTICAL_SEPARATOR;
|
||||
options.notesSeparator = options.notesSeparator || markdownConfig?.notesSeparator || DEFAULT_NOTES_SEPARATOR;
|
||||
options.attributes = options.attributes || '';
|
||||
|
||||
return options;
|
||||
@ -426,7 +426,7 @@ const Plugin = () => {
|
||||
|
||||
deck = reveal;
|
||||
|
||||
let { renderer, animateLists, defaultOptions, ...markedOptions } = deck.getConfig().markdown || {};
|
||||
let { renderer, animateLists, ...markedOptions } = deck.getConfig().markdown || {};
|
||||
|
||||
if( !renderer ) {
|
||||
renderer = new marked.Renderer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user