henkan 2.4.8 → 2.4.9
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 +4 -2
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +2 -2
- package/dist/types/utils.d.ts.map +1 -1
- package/docs/api/functions/generateAnkiNote.md +1 -1
- package/docs/api/functions/generateAnkiNotesFile.md +1 -1
- package/package.json +1 -1
- package/src/utils.ts +11 -2
package/dist/index.mjs
CHANGED
|
@@ -2597,11 +2597,13 @@ function getWord(searchedWord, dict, kanjiDic, examples, definitions, noteTypeNa
|
|
|
2597
2597
|
break;
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
|
+
const hasKfExamplesWithTranslation = kanjiFormExamples.some(
|
|
2601
|
+
(ex) => ex.includesTranslation === true
|
|
2602
|
+
);
|
|
2600
2603
|
if (kanjiFormExamples.length > 0 && readingMatchingKanjiForms.size > 0)
|
|
2601
2604
|
kanjiFormExamples = kanjiFormExamples.filter(
|
|
2602
|
-
(ex) => ex.includesTranslation === true && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
|
|
2605
|
+
(ex) => (!hasKfExamplesWithTranslation || ex.includesTranslation === true) && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
|
|
2603
2606
|
);
|
|
2604
|
-
else kanjiFormExamples.length = 0;
|
|
2605
2607
|
if (readingExamples.length > 0 && readingExamples.some(
|
|
2606
2608
|
(ex) => ex.includesTranslation === true || ex.referenceIDMatch === true
|
|
2607
2609
|
))
|