henkan 2.4.8 → 2.4.10
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 +6 -2
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.mjs +6 -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 +17 -3
package/dist/index.cjs.js
CHANGED
|
@@ -2660,11 +2660,15 @@ 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.
|
|
2668
|
+
(ex) => ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form) && (!hasKfExamplesWithTranslation || ex.includesTranslation === true || ex.ex.parts.some(
|
|
2669
|
+
(part) => readingMatchingKanjiForms.has(part.baseForm) && part.glossNumber !== void 0
|
|
2670
|
+
))
|
|
2666
2671
|
);
|
|
2667
|
-
else kanjiFormExamples.length = 0;
|
|
2668
2672
|
if (readingExamples.length > 0 && readingExamples.some(
|
|
2669
2673
|
(ex) => ex.includesTranslation === true || ex.referenceIDMatch === true
|
|
2670
2674
|
))
|