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.cjs.js
CHANGED
|
@@ -2660,11 +2660,13 @@ function getWord(searchedWord, dict, kanjiDic, examples, definitions, noteTypeNa
|
|
|
2660
2660
|
break;
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
|
+
const hasKfExamplesWithTranslation = kanjiFormExamples.some(
|
|
2664
|
+
(ex) => ex.includesTranslation === true
|
|
2665
|
+
);
|
|
2663
2666
|
if (kanjiFormExamples.length > 0 && readingMatchingKanjiForms.size > 0)
|
|
2664
2667
|
kanjiFormExamples = kanjiFormExamples.filter(
|
|
2665
|
-
(ex) => ex.includesTranslation === true && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
|
|
2668
|
+
(ex) => (!hasKfExamplesWithTranslation || ex.includesTranslation === true) && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
|
|
2666
2669
|
);
|
|
2667
|
-
else kanjiFormExamples.length = 0;
|
|
2668
2670
|
if (readingExamples.length > 0 && readingExamples.some(
|
|
2669
2671
|
(ex) => ex.includesTranslation === true || ex.referenceIDMatch === true
|
|
2670
2672
|
))
|