Skip to content

Commit

Permalink
s/_/__/
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 23, 2010
1 parent fd0e2a2 commit 3ad6e6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Compiler.prototype = {

line: function(node){
if (node.instrumentLineNumber === false) return;
this.buf.push('_.lineno = ' + node.line + ';');
this.buf.push('__.lineno = ' + node.line + ';');
},

/**
Expand Down
10 changes: 5 additions & 5 deletions lib/jade.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ exports.compile = function(str, options){

// Reduce closure madness by injecting some locals
var fn = [
'var _ = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
'var __ = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
rethrow.toString(),
'try {',
parse(String(str), options || {}),
'} catch (err) {',
' rethrow(err, _.input, _.filename, _.lineno);',
' rethrow(err, __.input, __.filename, __.lineno);',
'}'
].join('\n');

Expand Down Expand Up @@ -270,11 +270,11 @@ exports.render = function(str, options){
// Render the template
try {
var locals = options.locals || {}
, _ = { lineno: 1 };
locals._ = _;
, meta = { lineno: 1 };
locals.__ = meta;
return fn.call(options.scope, locals);
} catch (err) {
rethrow(err, str, filename, _.lineno);
rethrow(err, str, filename, meta.lineno);
}
};

Expand Down

0 comments on commit 3ad6e6a

Please sign in to comment.