Comparing version 3.2.8 to 3.3.0
@@ -217,6 +217,6 @@ "use strict"; | ||
} while (ascii !== 125 && this.i <= this.mf.length); // closing curly bracket | ||
if (substring.match(/^[\d,]+$/)) { | ||
if (substring.match(/^[0-9.,]+$/)) { | ||
return substring.split(',').map(Number); | ||
} | ||
throw new MFError(this.mf, this.i, 'Curly brackets should contain only number and comma'); | ||
throw new MFError(this.mf, this.i, 'Curly brackets should contain only number, dot and comma'); | ||
} | ||
@@ -223,0 +223,0 @@ getParenthesisCharge(ascii) { |
@@ -22,3 +22,3 @@ "use strict"; | ||
'.': '˙', | ||
',': '˙', | ||
',': '˒', | ||
}; | ||
@@ -25,0 +25,0 @@ exports.subscript = { |
{ | ||
"name": "mf-parser", | ||
"version": "3.2.8", | ||
"version": "3.3.0", | ||
"description": "Parse a molecular formula", | ||
@@ -29,3 +29,3 @@ "main": "lib/src/index.js", | ||
}, | ||
"gitHead": "4dddbfbe7419d995ed5c2b5aaa32d1987ef3aa71" | ||
"gitHead": "4348a705339e89ccb27f80459be87ce2d5053e69" | ||
} |
@@ -234,3 +234,3 @@ /* eslint-disable unicorn/prefer-code-point */ | ||
} while (ascii !== 125 && this.i <= this.mf.length); // closing curly bracket | ||
if (substring.match(/^[\d,]+$/)) { | ||
if (substring.match(/^[0-9.,]+$/)) { | ||
return substring.split(',').map(Number); | ||
@@ -241,3 +241,3 @@ } | ||
this.i, | ||
'Curly brackets should contain only number and comma', | ||
'Curly brackets should contain only number, dot and comma', | ||
); | ||
@@ -244,0 +244,0 @@ } |
@@ -19,3 +19,3 @@ export const superscript = { | ||
'.': '˙', | ||
',': '˙', | ||
',': '˒', | ||
}; | ||
@@ -22,0 +22,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307342