Cybrkyd's Git Repositories

jottings - commit: 555cb10

commit 555cb105f58c9b9dfcb4d0f21bd66d641c84b9ee028f01a3ca6078a572212f1b
author Cybrkyd <git@cybrkyd.com> 2026-06-26 09:26:02 +0100
committer Cybrkyd <git@cybrkyd.com> 2026-06-26 09:26:02 +0100

Commit Message

Remove isIgnorableNumericPossessive

Numerical possessives (1's, 808's, etc) are now dealt with by the Hunspell dictionary.

📊 Diffstat

resources/js/app.js 9
1 files changed, 0 insertions(+), 9 deletions(-)

Diff

diff --git a/resources/js/app.js b/resources/js/app.js
index 387bf6f..30fe7b3 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -175,23 +175,14 @@ async function addToPersonalDic(word) {
runSpellcheck();
}
- function isIgnorableNumericPossessive(word) {
- const m = word.match(/^(.*)['\u2019]s$/i);
- if (!m) return false;
- const base = m[1];
- return base.length > 0 && /^[0-9]+$/.test(base);
- }
-
function isCorrect(word) {
if (word === '') return true;
if (/^['\u2019]+$/.test(word)) return true;
- if (isIgnorableNumericPossessive(word)) return true;
const result = spell.lookup(word);
return result.correct && !result.forbidden;
}
function getSuggestions(word) {
- if (isIgnorableNumericPossessive(word)) return [];
if (word === '') return [];
return spell.suggest(word);
}