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.
|
* 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();
|
||||||
@ -461,7 +461,7 @@ const Plugin = () => {
|
|||||||
code = escapeForHTML( code );
|
code = escapeForHTML( code );
|
||||||
|
|
||||||
// return `<pre><code ${lineNumbers} class="${language}">${code}</code></pre>`;
|
// return `<pre><code ${lineNumbers} class="${language}">${code}</code></pre>`;
|
||||||
|
|
||||||
return `<pre><code ${lineNumbers} ${lineNumberOffset} class="${language}">${code}</code></pre>`;
|
return `<pre><code ${lineNumbers} ${lineNumberOffset} class="${language}">${code}</code></pre>`;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user