summaryrefslogtreecommitdiff
path: root/html/item_preview.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/item_preview.js')
-rw-r--r--html/item_preview.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/html/item_preview.js b/html/item_preview.js
index cdc56d9..fed03d2 100644
--- a/html/item_preview.js
+++ b/html/item_preview.js
@@ -129,12 +129,10 @@ function mapping_preview(mapping, preview_object, link_cb=make_file_link) {
/* We use a non-breaking space because normal space would be ignored. */
const [nbsp, rarrow] = [160, 0x2192].map(n => String.fromCodePoint(n));
const texts = [`${pattern}${nbsp}`, `${rarrow} ${payload.identifier}`];
- for (let i = 0; i < texts.length; i++) {
- const span = document.createElement("span");
- span.innerText = texts[i];
- span.classList.add(`grid_col_${i + 1}`);
- preview_object.payloads.append(span);
- }
+ const payload_entry = clone_template("pattern_payload_entry");
+ payload_entry.pattern.innerText = pattern;
+ payload_entry.payload.innerText = payload.identifier;
+ preview_object.payloads.append(payload_entry.main_div);
}
const link_maker = file_ref => link_cb(preview_object, file_ref);