Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
Allow bools in token parser by default. Fixes gh-321
Browse files Browse the repository at this point in the history
  • Loading branch information
paularmstrong committed Sep 14, 2013
1 parent c2a5d3a commit bbca4a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/parser.js
Expand Up @@ -177,6 +177,7 @@ TokenParser.prototype = {
break;

case _t.NUMBER:
case _t.BOOL:
self.filterApplyIdx.push(self.out.length);
self.out.push(match);
break;
Expand Down
3 changes: 2 additions & 1 deletion tests/variables.test.js
Expand Up @@ -18,7 +18,8 @@ var cases = {
'can be string and number literals': [
{ c: '{{ "a" }}', e: 'a' },
{ c: '{{ 1 }}', e: '1' },
{ c: '{{ 1.5 }}', e: '1.5' }
{ c: '{{ 1.5 }}', e: '1.5' },
{ c: '{{ true }}', e: 'true' }
],
'return empty string if undefined': [
{ c: '"{{ u }}"', e: '""' }
Expand Down

0 comments on commit bbca4a7

Please sign in to comment.