Skip to content

Commit f5f4bf1

Browse files
committed
Merge pull request #100 from fenichelar/master
Add support for scientific notation for numbers
2 parents e96aa3b + ff9173c commit f5f4bf1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/core/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function Parser(name, regExp, parser, processSafe) {
1616
this.parse = parser;
1717
}
1818
}
19-
var numReg = /^[-+]?[0-9]*\.?[0-9]+$/;
19+
var numReg = /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;
2020
Parser.prototype.convertType = function(item) {
2121
var type=this.type;
2222
if (type === 'number') {

0 commit comments

Comments
 (0)