Added AMD friendly piece of code.
This commit is contained in:
parent
96e13ee912
commit
32db258511
1 changed files with 9 additions and 0 deletions
|
@ -1442,3 +1442,12 @@ var escapeCharacters_callback = function(wholeMatch,m1) {
|
||||||
|
|
||||||
// export
|
// export
|
||||||
if (typeof module !== 'undefined') module.exports = Showdown;
|
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;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue