@@ -95,7 +95,7 @@ exports.parse = function (text) {
})
lastIndex = index + match[0].length
}
- if (lastIndex < text.length - 1) {
+ if (lastIndex < text.length) {
tokens.push({
value: text.slice(lastIndex)
@@ -43,6 +43,14 @@ var testCases = [
{ value: ' and ' },
{ tag: true, value: 'hello', html: false, oneTime: false, partial: true }
]
+ },
+ {
+ text: '[{{abc}}]',
+ expected: [
+ { value: '[' },
+ { tag: true, value: 'abc', html: false, oneTime: false },
+ { value: ']' }
+ ]