Skip to content
This repository
Browse code

Cleanup code and typos

  • Loading branch information...
commit 1fbc4255e93db150fc6d01f7f8017139b61fb9c2 1 parent b9210e8
Cameron Howey authored May 02, 2012
8  lib/compiler.js
@@ -318,9 +318,9 @@ Compiler.prototype = {
318 318
           var val = this.attrs(attrs);
319 319
           if (val.inherits) {
320 320
             this.buf.push('attributes: merge({' + val.buf
321  
-                + '}, attributes), escaped: merge(' + val.escaped + ', __escaped)');
  321
+                + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)');
322 322
           } else {
323  
-            this.buf.push('attributes: {' + val.buf + '}, excaped: ' + val.escaped);
  323
+            this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped);
324 324
           }
325 325
         }
326 326
         
@@ -336,7 +336,7 @@ Compiler.prototype = {
336 336
       if (pp) this.buf.push("__indent.pop();")
337 337
     } else {
338 338
       this.buf.push('var ' + name + ' = function(' + args + '){');
339  
-      this.buf.push('var block = this.block, attributes = this.attributes || {}, __escaped = this.escaped || {};');
  339
+      this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};');
340 340
       this.parentIndents++;
341 341
       this.visit(block);
342 342
       this.parentIndents--;
@@ -549,7 +549,7 @@ Compiler.prototype = {
549 549
     var val = this.attrs(attrs);
550 550
     if (val.inherits) {
551 551
       this.buf.push("buf.push(attrs(merge({ " + val.buf +
552  
-          " }, attributes), merge(" + val.escaped + ", __escaped)));");
  552
+          " }, attributes), merge(" + val.escaped + ", escaped, true)));");
553 553
     } else {
554 554
       this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));");
555 555
     }
2  lib/lexer.js
@@ -375,7 +375,7 @@ Lexer.prototype = {
375 375
       var tok = this.tok('call', captures[1]);
376 376
       
377 377
       // Check for args (not attributes)
378  
-      if (captures = /^ *\(([^\)\n]*)\)/.exec(this.input)) {
  378
+      if (captures = /^ *\((.*?)\)/.exec(this.input)) {
379 379
         if (!/^ *[-\w]+ *=/.test(captures[1])) {
380 380
           this.consume(captures[0].length);
381 381
           tok.args = captures[1];

0 notes on commit 1fbc425

Please sign in to comment.
Something went wrong with that request. Please try again.