From b42212669670097d7508a25d9fce8a06e13cac3b Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Tue, 25 Mar 2014 15:50:19 +1100 Subject: [PATCH] Fixed issue when using custom RequireJS loader --- lib/marked.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index e2f08c9983..145dbad3f1 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -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; });