mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Added AMD friendly piece of code.
This commit is contained in:
parent
599e9d47f7
commit
2d80b3af04
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user