twl-generator 1.4.5 → 1.4.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 +2 -2
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twl-generator",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "Generate term-to-article lists from unfoldingWord en_tw archive for Bible books. Works in both Node.js (CLI) and React.js (browser) environments.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
"optional": true
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|
package/src/index.js
CHANGED
|
@@ -880,7 +880,7 @@ export async function generateTwlByBook(bookCode, options = {}) {
|
|
|
880
880
|
if (/[^aeiou]y$/i.test(w)) return w.replace(/y$/i, 'ied');
|
|
881
881
|
// Do not double the final consonant for words ending in "er" (e.g., gather -> gathered)
|
|
882
882
|
const lastCh = w[w.length - 1];
|
|
883
|
-
if (endsWithCVC(w) && !/(?:er|en)$/i.test(w)) return w + lastCh + 'ed';
|
|
883
|
+
if (endsWithCVC(w) && !/(?:er|en|or|on|al|el)$/i.test(w)) return w + lastCh + 'ed';
|
|
884
884
|
return w + 'ed';
|
|
885
885
|
};
|
|
886
886
|
const ingForm = (w) => {
|
|
@@ -888,7 +888,7 @@ export async function generateTwlByBook(bookCode, options = {}) {
|
|
|
888
888
|
if (/ee$/i.test(w)) return w + 'ing';
|
|
889
889
|
if (/e$/i.test(w)) return w.replace(/e$/i, 'ing');
|
|
890
890
|
const lastCh = w[w.length - 1];
|
|
891
|
-
if (endsWithCVC(w) && !/(?:er|en)$/i.test(w)) return w + lastCh + 'ing';
|
|
891
|
+
if (endsWithCVC(w) && !/(?:er|en|or|on|al|el)$/i.test(w)) return w + lastCh + 'ing';
|
|
892
892
|
return w + 'ing';
|
|
893
893
|
};
|
|
894
894
|
|