Skip to content

Commit

Permalink
allow funky mixin whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 8, 2011
1 parent 7915b07 commit 1d549ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lexer.js
Expand Up @@ -348,7 +348,7 @@ Lexer.prototype = {

mixin: function(){
var captures;
if (captures = /^mixin +([-\w]+)(?:\((.*)\))?/.exec(this.input)) {
if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) {
this.consume(captures[0].length);
var tok = this.tok('mixin', captures[1]);
tok.args = captures[2];
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/mixins.jade
@@ -1,10 +1,10 @@

mixin comment(title, str)
mixin comment (title, str)
.comment
h2= title
p.body= str

#user
h1 Tobi
.comments
mixin comment('foo', 'bar (baz)')
mixin comment ('foo', 'bar (baz)')

0 comments on commit 1d549ec

Please sign in to comment.