henkan 2.2.1 → 2.2.3
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/dist/index.cjs.js +3 -5
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.mjs +3 -5
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2139,7 +2139,7 @@ function getWordDefinitions(entryList, jmDict) {
|
|
|
2139
2139
|
const defCount = definitionMap.get(
|
|
2140
2140
|
pair.definitions[j].definition
|
|
2141
2141
|
);
|
|
2142
|
-
if (defCount && defCount.count >
|
|
2142
|
+
if (defCount && defCount.count > 1)
|
|
2143
2143
|
pair.definitions[j].mayNotBeAccurate = true;
|
|
2144
2144
|
}
|
|
2145
2145
|
japaneseDefinitions[i] = pair;
|
|
@@ -2402,9 +2402,7 @@ function getWord(word, dict, kanjiDic, examples, definitions, noteTypeName, deck
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
if (glossSpecificExamples.length
|
|
2406
|
-
wordExamples = glossSpecificExamples;
|
|
2407
|
-
else if (glossSpecificExamples.length > 0) {
|
|
2405
|
+
if (glossSpecificExamples.length > 0) {
|
|
2408
2406
|
const exes = glossSpecificExamples;
|
|
2409
2407
|
if (exes.length < 5) {
|
|
2410
2408
|
wordExamples = wordExamples.filter(
|
|
@@ -2419,7 +2417,7 @@ function getWord(word, dict, kanjiDic, examples, definitions, noteTypeName, deck
|
|
|
2419
2417
|
wordExamples = exes;
|
|
2420
2418
|
}
|
|
2421
2419
|
if (wordExamples.length > 0) {
|
|
2422
|
-
word2.phrases = (
|
|
2420
|
+
word2.phrases = (glossSpecificExamples.length === 0 ? wordExamples.slice(0, 5) : wordExamples).map((ex) => ({
|
|
2423
2421
|
phrase: ex.ex.furigana ?? ex.ex.phrase,
|
|
2424
2422
|
translation: ex.ex.translation,
|
|
2425
2423
|
originalPhrase: ex.ex.phrase,
|