From a9019707fc0e838cedbaa990894de88142638cd1 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Wed, 31 Jan 2024 23:42:11 -0800 Subject: [PATCH] Move pos and label tags to sense tags --- src/util/yomitan/convertEntryToYomitanTerms.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/yomitan/convertEntryToYomitanTerms.js b/src/util/yomitan/convertEntryToYomitanTerms.js index 18b24a7..77d2e6b 100644 --- a/src/util/yomitan/convertEntryToYomitanTerms.js +++ b/src/util/yomitan/convertEntryToYomitanTerms.js @@ -33,11 +33,10 @@ function convertEntryToYomitanTerms(dictionaryEntry) { function addTagsToTermEntry(dictionaryEntry, termEntry) { const termTags = []; const entryTags = []; + const tagTypesToAdd = ['pos', 'label']; for (const tag of dictionaryEntry.tags) { - if (tag.name === 'pos') { + if (tagTypesToAdd.includes(tag.name)) { entryTags.push(tag.value); - } else if (tag.name === 'label') { - termTags.push(tag.value); } } termEntry.setTermTags(termTags.join(' '));