diff --git a/src/showdown.js b/src/showdown.js index b488bad..9ce7bcb 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -64,7 +64,9 @@ // // Showdown namespace // -var Showdown = { extensions: {} }; +var Showdown = typeof exports === 'object' ? exports : {}; + +Showdown.extensions = {}; // // forEach @@ -1441,9 +1443,6 @@ var escapeCharacters_callback = function(wholeMatch,m1) { } // end of Showdown.converter -// export -if (typeof module !== 'undefined') module.exports = Showdown; - // stolen from AMD branch of underscore // AMD define happens at the end for compatibility with AMD loaders // that don't enforce next-turn semantics on modules.