We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c575c6 commit 44f43b7Copy full SHA for 44f43b7
dictionary/parser.ts
@@ -294,8 +294,8 @@ const prepositionDefinition = checkedSimpleUnitWithTemplate(
294
.map((preposition) => ({ type: "preposition", preposition }) as const);
295
const numeralDefinition = checkedSimpleUnit("num")
296
.mapWithPositionedError((num) => {
297
- const numeral = Number.parseInt(num, 10);
298
- if (Number.isNaN(numeral)) {
+ const numeral = +num;
+ if (!Number.isInteger(numeral)) {
299
throw `"${num}" is not a number`;
300
} else {
301
return { type: "numeral", numeral } as const;
0 commit comments