Added AMD friendly piece of code.

This commit is contained in:
Joe Martin 2012-06-21 15:30:33 +02:00
parent f68216820a
commit 404861d50c

View File

@ -1339,3 +1339,12 @@ var escapeCharacters_callback = function(wholeMatch,m1) {
// 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.
if (typeof define === 'function' && define.amd) {
define('showdown', function() {
return Showdown;
});
}