Permalink
Browse files

Closes #143, inlineText: false should skip text loading.

  • Loading branch information...
jrburke committed Nov 19, 2011
1 parent cb6aafe commit 129dbdd74ba85434bc86d0644247cc054417b86e
Showing with 8 additions and 1 deletion.
  1. +8 −1 text.js
View
@@ -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);
@@ -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),

0 comments on commit 129dbdd

Please sign in to comment.