Skip to content

Commit

Permalink
fix single element info not expanded if element kanji = result kanji …
Browse files Browse the repository at this point in the history
…(e.g. 由 kanji "wherefore" in rtk, but same element kanji 由 called "sprout")
  • Loading branch information
sschmidTU committed Sep 2, 2024
1 parent 5204a3d commit 109f7b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/js/wtksearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ class WTKSearch {
let singleElementElKey = null;
if (this.addElementsInfo && page.elT) {
elStringOrig = removeStructure(page.elT);
isSingleElementWithSameName = elStringOrig === page.kw.toLowerCase();
isSingleElementWithSameName = elStringOrig === page.kw.toLowerCase() ||
elementsDict[elStringOrig]?.kanji === page.kanji;
const elTranslations = {};
const elTSplit = elStringOrig.split(",").map(a => a.trim());
let elString = '';
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1><img src="assets/img/favicon.ico" height="32"/> Multi-Radical Kanji Search (
<p>
@ <a id="gitCommitsLink" href="https://github.com/sschmidTU/mr-kanji-search-wtk/commits/offline">2024-09-03</a>
<a href="https://github.com/sschmidTU/mr-kanji-search-wtk" id="wtkVersionFooterElement">
wtk-search v2.0.2.1-offline
wtk-search v2.0.2.2-offline
</a> by <a href="https://community.wanikani.com/t/multi-radical-kanji-search-web/46781">Saimin@WK</a>, based on rtk-search
<br>3150 Kanji searchable (latest: <a id='btnSearchLatestKanji'></a>)
<br>
Expand Down

0 comments on commit 109f7b2

Please sign in to comment.