tweak plugin initialization to enable multi-instance plugins

This commit is contained in:
Hakim El Hattab
2020-04-17 14:10:56 +02:00
parent 7e72b10fa5
commit e58502b3fb
20 changed files with 128 additions and 110 deletions

View File

@ -6,7 +6,7 @@
import marked from './marked.js'
export default {
let Plugin = {
id: 'markdown',
@ -15,6 +15,7 @@ export default {
* current reveal.js deck.
*/
init: function( deck ) {
// This should no longer be needed, as long as the highlight.js
// plugin is included after the markdown plugin
// if( typeof window.hljs !== 'undefined' ) {
@ -43,6 +44,8 @@ export default {
};
export default () => Plugin;
var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
DEFAULT_NOTES_SEPARATOR = 'notes?:',
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',