Skip to content

Commit

Permalink
n canon uses token if already numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
kengz committed Mar 5, 2016
1 parent 26bcfcf commit b8d5410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/norm.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function restoreTokens(syms, tokObj) {
token = '';
switch (sName) {
case 'n':
token = s.value.toString();
// if token is already numeric, use it
token = (s.token.match(/^\s*[\d.]+\s*$/)) ? s.token.trim() : s.value.toString();
break;
case 'T':
// handles shits like 1 am ~ t:1h00m,dt:, am (token returned)
Expand Down

0 comments on commit b8d5410

Please sign in to comment.