« get me outta code hell

content: linkContribution: add preventWrapping slot - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-10 10:53:45 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-10 10:53:45 -0300
commitf49326e998f69931b52969c4235b0ee478ddc682 (patch)
tree22821489f63ef6a5395ddd6aad930082917f45ff /src/content
parentf00554fe281dfccfed09524b4fc9a6677a56ffcf (diff)
content: linkContribution: add preventWrapping slot
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/linkContribution.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js
index f4c05388..2219ae1d 100644
--- a/src/content/dependencies/linkContribution.js
+++ b/src/content/dependencies/linkContribution.js
@@ -36,6 +36,7 @@ export default {
   slots: {
     showContribution: {type: 'boolean', default: false},
     showIcons: {type: 'boolean', default: false},
+    preventWrapping: {type: 'boolean', default: true},
   },
 
   generate(data, relations, slots, {html, language}) {
@@ -63,7 +64,7 @@ export default {
     const content = language.formatString(parts.join('.'), options);
 
     return (
-      (parts.length > 1
+      (parts.length > 1 && slots.preventWrapping
         ? html.tag('span',
             {[html.noEdgeWhitespace]: true, class: 'nowrap'},
             content)