unprint 0.10.5 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/app.js +2 -2
- package/tests/index.html +2 -1
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -195,11 +195,11 @@ const defaultNumberRegexp = /\d+([.,]\d+)?/;
|
|
|
195
195
|
|
|
196
196
|
function matchNumberString(numberString, options) {
|
|
197
197
|
if (numberString && options.match) {
|
|
198
|
-
return Number(numberString.match(options.match)?.[options.matchIndex]) || null;
|
|
198
|
+
return Number(numberString.match(options.match)?.[options.matchIndex]?.replace(',', '.')) || null;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
if (numberString) {
|
|
202
|
-
return Number(numberString) || null;
|
|
202
|
+
return Number(numberString.replace(',', '.')) || null;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
return null;
|
package/tests/index.html
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
<ul id="numbers">
|
|
18
18
|
<li class="number">123</li>
|
|
19
19
|
<li class="number">234.56</li>
|
|
20
|
-
<li class="number">789
|
|
20
|
+
<li class="number">789,30</li>
|
|
21
|
+
<li class="number">200,0</li>
|
|
21
22
|
</ul>
|
|
22
23
|
|
|
23
24
|
<a id="link" class="link" href="http://localhost:3101/html">Get URL</a>
|