« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/linkContribution.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js
index 0c5ec8f4..c658d461 100644
--- a/src/content/dependencies/linkContribution.js
+++ b/src/content/dependencies/linkContribution.js
@@ -28,8 +28,11 @@ export default {
     showExternalLinks: {type: 'boolean', default: false},
     showChronology: {type: 'boolean', default: false},
 
+    trimAnnotation: {type: 'boolean', default: false},
+
     preventWrapping: {type: 'boolean', default: true},
     preventTooltip: {type: 'boolean', default: false},
+
     chronologyKind: {type: 'string'},
   },
 
@@ -67,10 +70,14 @@ export default {
                   relations.tooltip,
               }));
 
-        if (slots.showAnnotation && data.annotation) {
+        const annotation =
+          (slots.trimAnnotation
+            ? data.annotation?.replace(/^edits for wiki(: )?/, '')
+            : data.annotation);
+
+        if (slots.showAnnotation && annotation) {
           workingCapsule += '.withContribution';
-          workingOptions.contrib =
-            data.annotation;
+          workingOptions.contrib = annotation;
         }
 
         return language.formatString(workingCapsule, workingOptions);