Skip to content

Commit

Permalink
Merge pull request #374 from zaggino/master
Browse files Browse the repository at this point in the history
Fixed issue when using custom RequireJS loader
  • Loading branch information
chjj committed Mar 26, 2014
2 parents 43db549 + b422126 commit 4ed4cc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,10 @@ marked.inlineLexer = InlineLexer.output;

marked.parse = marked;

if (typeof exports === 'object') {
// - custom setup of RequireJS provides 'exports' variable without 'module'
// function loadExtension @
// https://github.com/adobe/brackets/blob/master/src/utils/ExtensionLoader.js
if (typeof module !== "undefined" && typeof exports === 'object') {
module.exports = marked;
} else if (typeof define === 'function' && define.amd) {
define(function() { return marked; });
Expand Down

0 comments on commit 4ed4cc9

Please sign in to comment.