Browse files

Slightly cleaner approach

  • Loading branch information...
1 parent 55bf88a commit 474b3410c2a5c598c3f4ec26c54319142f706bb5 @chowey chowey committed with tj May 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/lexer.js
View
4 lib/lexer.js
@@ -300,10 +300,10 @@ Lexer.prototype = {
block: function() {
var captures;
- if (captures = /^block(?: +(?:(prepend|append) +)?([^\n]*)|(?=\n))/.exec(this.input)) {
+ if (captures = /^block(?!\S) *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) {
this.consume(captures[0].length);
var mode = captures[1] || 'replace'
- , name = captures[2] || ''
+ , name = captures[2]
, tok = this.tok('block', name);
tok.mode = mode;

0 comments on commit 474b341

Please sign in to comment.