Permalink
Browse files

Cleanup code and typos

  • Loading branch information...
1 parent b9210e8 commit 1fbc4255e93db150fc6d01f7f8017139b61fb9c2 @chowey chowey committed May 2, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/compiler.js
  2. +1 −1 lib/lexer.js
View
8 lib/compiler.js
@@ -318,9 +318,9 @@ Compiler.prototype = {
var val = this.attrs(attrs);
if (val.inherits) {
this.buf.push('attributes: merge({' + val.buf
- + '}, attributes), escaped: merge(' + val.escaped + ', __escaped)');
+ + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)');
} else {
- this.buf.push('attributes: {' + val.buf + '}, excaped: ' + val.escaped);
+ this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped);
}
}
@@ -336,7 +336,7 @@ Compiler.prototype = {
if (pp) this.buf.push("__indent.pop();")
} else {
this.buf.push('var ' + name + ' = function(' + args + '){');
- this.buf.push('var block = this.block, attributes = this.attributes || {}, __escaped = this.escaped || {};');
+ this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};');
this.parentIndents++;
this.visit(block);
this.parentIndents--;
@@ -549,7 +549,7 @@ Compiler.prototype = {
var val = this.attrs(attrs);
if (val.inherits) {
this.buf.push("buf.push(attrs(merge({ " + val.buf +
- " }, attributes), merge(" + val.escaped + ", __escaped)));");
+ " }, attributes), merge(" + val.escaped + ", escaped, true)));");
} else {
this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));");
}
View
2 lib/lexer.js
@@ -375,7 +375,7 @@ Lexer.prototype = {
var tok = this.tok('call', captures[1]);
// Check for args (not attributes)
- if (captures = /^ *\(([^\)\n]*)\)/.exec(this.input)) {
+ if (captures = /^ *\((.*?)\)/.exec(this.input)) {
if (!/^ *[-\w]+ *=/.test(captures[1])) {
this.consume(captures[0].length);
tok.args = captures[1];

0 comments on commit 1fbc425

Please sign in to comment.