Skip to content

Commit

Permalink
drop @ from @{mixin,include}
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 13, 2011
1 parent 3173462 commit 944b4f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/includes.jade
@@ -1,6 +1,6 @@

html
@include includes/head
include includes/head
body
h1 My Site
p Welcome to my super lame site.
8 changes: 4 additions & 4 deletions examples/mixins.jade
@@ -1,11 +1,11 @@

@include dialog-mixins
include dialog-mixins

.one
@mixin dialog
mixin dialog

.two
@mixin dialog-title('Whoop')
mixin dialog-title('Whoop')

.three
@mixin dialog-title-desc('Whoop', 'Just a mixin')
mixin dialog-title-desc('Whoop', 'Just a mixin')
4 changes: 2 additions & 2 deletions lib/lexer.js
Expand Up @@ -238,7 +238,7 @@ Lexer.prototype = {
*/

include: function() {
return this.scan(/^@include +([^\n]+)/, 'include');
return this.scan(/^include +([^\n]+)/, 'include');
},

/**
Expand All @@ -247,7 +247,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

0 comments on commit 944b4f6

Please sign in to comment.