Comparing version 0.9.6 to 0.10.0
{ | ||
"name": "razorleaf", | ||
"version": "0.9.6", | ||
"version": "0.10.0", | ||
"main": "razorleaf.js", | ||
@@ -5,0 +5,0 @@ "files": ["razorleaf.js"], |
@@ -134,4 +134,8 @@ "use strict"; | ||
Parser.prototype.peek = function() { | ||
return this.template[this.index + 1] || null; | ||
Parser.prototype.peek = function(n) { | ||
if(n === undefined) { | ||
n = 1; | ||
} | ||
return this.template[this.index + n] || null; | ||
}; | ||
@@ -174,3 +178,4 @@ | ||
while(this.peek() && identifierCharacter.test(this.peek())) { | ||
while(this.peek() && (identifierCharacter.test(this.peek()) || | ||
(this.peek() === ":" && (!this.peek(2) || !whitespaceCharacter.test(this.peek(2)))))) { | ||
identifier += this.read(); | ||
@@ -177,0 +182,0 @@ } |
@@ -73,3 +73,4 @@ Razor Leaf is a template engine for HTML. It is indentation-based and vaguely | ||
string if provided. If a value is not provided, the attribute is assumed to be | ||
boolean. | ||
boolean. Whitespace between the colon and value is required, as both attribute | ||
and element names may contain colons. | ||
@@ -76,0 +77,0 @@ ### Strings |
17431
514
101