Skip to content

Commit

Permalink
Closes requirejs#143, inlineText: false should skip text loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrburke committed Nov 19, 2011
1 parent cb6aafe commit 129dbdd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion text.js
Expand Up @@ -197,7 +197,7 @@

finishLoad: function (name, strip, content, onLoad, config) {
content = strip ? text.strip(content) : content;
if (config.isBuild && config.inlineText) {
if (config.isBuild) {
buildMap[name] = content;
}
onLoad(content);
Expand All @@ -211,6 +211,13 @@
//removing the <?xml ...?> declarations so the content can be inserted
//into the current doc without problems.

// Do not bother with the work if a build and text will
// not be inlined.
if (config.isBuild && !config.inlineText) {
onLoad();
return;
}

var parsed = text.parseName(name),
nonStripName = parsed.moduleName + '.' + parsed.ext,
url = req.toUrl(nonStripName),
Expand Down

0 comments on commit 129dbdd

Please sign in to comment.