« get me outta code hell

content: linkTemplate: operate on provided attributes object - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-31 22:48:08 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-01 15:32:26 -0400
commit55aae709bdf7db8b1fda3465e3de3d8b46673d4b (patch)
treebdba5dec2b1d1bdcd976ddd08465329e518ae810 /src
parent7177209bd8b3131f17502fe2bc57dde5d29b331d (diff)
content: linkTemplate: operate on provided attributes object
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/linkTemplate.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/content/dependencies/linkTemplate.js b/src/content/dependencies/linkTemplate.js
index f17dd1a4..f683ac6b 100644
--- a/src/content/dependencies/linkTemplate.js
+++ b/src/content/dependencies/linkTemplate.js
@@ -27,7 +27,7 @@ export default {
     language,
     to,
   }) {
-    const attributes = html.attributes();
+    const {attributes} = slots;
 
     if (!slots.linkless) {
       let href =
@@ -61,10 +61,6 @@ export default {
             disallowedTags: new Set(['a']),
           }));
 
-    return (
-      html.tag('a',
-        attributes,
-        slots.attributes,
-        content));
+    return html.tag('a', attributes, content);
   },
 }