aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/database.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/database.js')
-rw-r--r--ext/bg/js/database.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js
index 7a893fc0..1c2194df 100644
--- a/ext/bg/js/database.js
+++ b/ext/bg/js/database.js
@@ -68,10 +68,12 @@ class Database {
const results = [];
await this.db.terms.where('expression').equals(term).or('reading').equals(term).each(row => {
if (titles.includes(row.dictionary)) {
+ const tags = row.tags.split('\t');
results.push({
expression: row.expression,
reading: row.reading,
- tags: dictFieldSplit(row.tags),
+ tags: dictFieldSplit(tags[0]),
+ termTags: tags.length > 1 ? dictFieldSplit(tags[1]) : [],
rules: dictFieldSplit(row.rules),
glossary: row.glossary,
score: row.score,
@@ -93,10 +95,12 @@ class Database {
const results = [];
await this.db.terms.where('sequence').equals(sequence).each(row => {
if (row.dictionary === mainDictionary) {
+ const tags = row.tags.split('\t');
results.push({
expression: row.expression,
reading: row.reading,
- tags: dictFieldSplit(row.tags),
+ tags: dictFieldSplit(tags[0]),
+ termTags: tags.length > 1 ? dictFieldSplit(tags[1]) : [],
rules: dictFieldSplit(row.rules),
glossary: row.glossary,
score: row.score,