diff options
Diffstat (limited to 'plugin/markdown')
-rwxr-xr-x | plugin/markdown/markdown.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 031160c..ad596bf 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -4,10 +4,13 @@ * of external markdown documents. */ (function( root, factory ) { - if( typeof exports === 'object' ) { + if (typeof define === 'function' && define.amd) { + root.marked = require( './marked' ); + root.RevealMarkdown = factory( root.marked ); + root.RevealMarkdown.initialize(); + } else if( typeof exports === 'object' ) { module.exports = factory( require( './marked' ) ); - } - else { + } else { // Browser globals (root is window) root.RevealMarkdown = factory( root.marked ); root.RevealMarkdown.initialize(); |