Skip to content

Commit

Permalink
use preserve instead of mark as default line handling option
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed May 18, 2012
1 parent 4b6300e commit 7d83ce3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/streamlineMe/streamlineMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function _transform() {
try {
var codeOut = Streamline.transform(codeIn, {
noHelpers: !_complete,
lines: _complete ? "mark" : "ignore"
lines: _complete ? "preserve" : "ignore"
});
$('#codeOut').val(codeOut);
info("ready")
Expand Down
2 changes: 1 addition & 1 deletion lib/callbacks/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ if (typeof exports !== 'undefined') {
}
options.source = source;
options.callback = options.callback || "_";
options.lines = options.lines || "mark";
options.lines = options.lines || "preserve";
//console.log("TRANSFORMING " + options.sourceName)
//console.log("source=" + source);
var node = parse(source + "\n"); // final newline avoids infinite loop if unterminated string literal at the end
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/compile._js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function _transform(transform, source, options) {
}
options.source = source;
options.callback = options.callback || "_";
options.lines = options.lines || "mark";
options.lines = options.lines || "preserve";
return transform.transform(source, options);
}

Expand Down Expand Up @@ -152,7 +152,7 @@ exports.loadFile = function(_, path, options) {
mtimejs = mtime(_, js);
}
mtimejs_ = mtime(_, js_);
options.lines = options.lines || (dontSave ? "preserve" : "mark");
options.lines = options.lines || "preserve";

var transform = _getTransform(options);
var banner = _banner(transform.version);
Expand Down Expand Up @@ -231,7 +231,7 @@ exports.transformModule = function(content, path, options) {
mtimejs = mtimeSync(js);
}
mtimejs_ = mtimeSync(js_);
options.lines = options.lines || (dontSave ? "preserve" : "mark");
options.lines = options.lines || "preserve";

var transform = _getTransform(options);
var banner = _banner(transform.version);
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function _transform(transform, source, options) {

options.source = source;
options.callback = (options.callback || "_");
options.lines = (options.lines || "mark");
options.lines = (options.lines || "preserve");
return transform.transform(source, options);};


Expand Down Expand Up @@ -152,7 +152,7 @@ exports.loadFile = function exports_loadFile__2(_, path, options) { var ext, bas
return mtime(__cb(_, __frame, 22, 12, function ___(__0, __6) { mtimejs = __6; __then(); }, true), js); } ; })(function __$exports_loadFile__2() {

return mtime(__cb(_, __frame, 24, 12, function ___(__0, __7) { mtimejs_ = __7;
options.lines = (options.lines || ((dontSave ? "preserve" : "mark")));
options.lines = (options.lines || "preserve");

transform = _getTransform(options);
banner = _banner(transform.version); return (function __$exports_loadFile__2(__then) {
Expand Down Expand Up @@ -231,7 +231,7 @@ exports.transformModule = function(content, path, options) {
mtimejs = mtimeSync(js); };

mtimejs_ = mtimeSync(js_);
options.lines = (options.lines || ((dontSave ? "preserve" : "mark")));
options.lines = (options.lines || "preserve");

var transform = _getTransform(options);
var banner = _banner(transform.version);
Expand Down

0 comments on commit 7d83ce3

Please sign in to comment.