Skip to content

Commit a2bdc84

Browse files
committed
allow non-word units
1 parent cfda8d3 commit a2bdc84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Parser.prototype.ident = function(){
2424
};
2525

2626
Parser.prototype.int = function(){
27-
var m = /^((\d+)(\w+)?) */.exec(this.str);
27+
var m = /^((\d+)(\S+)?) */.exec(this.str);
2828
if (!m) return;
2929
this.skip(m);
3030
var n = ~~m[2];
@@ -39,7 +39,7 @@ Parser.prototype.int = function(){
3939
};
4040

4141
Parser.prototype.float = function(){
42-
var m = /^((\d+)?(\.\d+)(\w+)?) */.exec(this.str);
42+
var m = /^((\d+)?(\.\d+)(\S+)?) */.exec(this.str);
4343
if (!m) return;
4444
this.skip(m);
4545
var n = parseFloat(m[2]);

0 commit comments

Comments
 (0)