aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/display-generator.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-24 19:06:29 -0500
committerGitHub <noreply@github.com>2020-11-24 19:06:29 -0500
commit02d9f7c736b55e22631c7ad29fa60df729a0f05b (patch)
treea3d13c29d01c5c6596e1590b7f196eae3cd1f18d /ext/mixed/js/display-generator.js
parent0b00de3c0f0cab64529f18a477120ab9362581fc (diff)
Improve html templates (#1061)
* Add template pre-processing * Remove whitespace * Add labels * Reuse tag template for search tags * Add space
Diffstat (limited to 'ext/mixed/js/display-generator.js')
-rw-r--r--ext/mixed/js/display-generator.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
index 09bfe411..0cf1e8c6 100644
--- a/ext/mixed/js/display-generator.js
+++ b/ext/mixed/js/display-generator.js
@@ -317,10 +317,12 @@ class DisplayGenerator {
}
_createSearchTag(text) {
- const node = this._templates.instantiate('tag-search');
- node.textContent = text;
- node.dataset.query = text;
- return node;
+ return this._createTag({
+ notes: '',
+ name: text,
+ category: 'search',
+ redundant: false
+ });
}
_createPitches(details) {