summaryrefslogtreecommitdiff
path: root/ext/bg/js/query-parser-generator.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-08 12:43:41 -0500
committerGitHub <noreply@github.com>2020-11-08 12:43:41 -0500
commit948605a1fe460eb1215753ef971a8e0ec4081eff (patch)
tree102bdbf0ed54c29726472e1c51c269d7ef7f805b /ext/bg/js/query-parser-generator.js
parent12e6e377854a9163b322a16f3effe816d0222c67 (diff)
Update query parser to properly display multi-line content (#1007)
Diffstat (limited to 'ext/bg/js/query-parser-generator.js')
-rw-r--r--ext/bg/js/query-parser-generator.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/bg/js/query-parser-generator.js b/ext/bg/js/query-parser-generator.js
index d53183ba..34923c1d 100644
--- a/ext/bg/js/query-parser-generator.js
+++ b/ext/bg/js/query-parser-generator.js
@@ -24,8 +24,7 @@ class QueryParserGenerator {
termNode.className = 'query-parser-term';
termNode.dataset.type = type;
for (const segment of term) {
- if (!segment.text.trim()) { continue; }
- if (!segment.reading.trim()) {
+ if (segment.reading.trim().length === 0) {
this._addSegmentText(segment.text, termNode);
} else {
termNode.appendChild(this._createSegment(segment));