« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateArtistCredit.js3
-rw-r--r--src/content/dependencies/generateArtistCreditWikiEditsPart.js1
-rw-r--r--src/content/dependencies/generateCoverArtworkOriginDetails.js2
-rw-r--r--src/content/dependencies/generateReleaseInfoContributionsLine.js2
-rw-r--r--src/content/dependencies/linkContribution.js10
5 files changed, 3 insertions, 15 deletions
diff --git a/src/content/dependencies/generateArtistCredit.js b/src/content/dependencies/generateArtistCredit.js
index 600d73d9..ac4b4936 100644
--- a/src/content/dependencies/generateArtistCredit.js
+++ b/src/content/dependencies/generateArtistCredit.js
@@ -104,8 +104,6 @@ export default {
     showChronology: {type: 'boolean', default: false},
     showWikiEdits: {type: 'boolean', default: false},
 
-    trimAnnotation: {type: 'boolean', default: false},
-
     chunkwrap: {type: 'boolean', default: true},
 
     chronologyKind: {type: 'string'},
@@ -125,7 +123,6 @@ export default {
       link.setSlots({
         showExternalLinks: slots.showExternalLinks,
         showChronology: slots.showChronology,
-        trimAnnotation: slots.trimAnnotation,
         chronologyKind: slots.chronologyKind,
       });
     }
diff --git a/src/content/dependencies/generateArtistCreditWikiEditsPart.js b/src/content/dependencies/generateArtistCreditWikiEditsPart.js
index 4178928d..7b3d8b1a 100644
--- a/src/content/dependencies/generateArtistCreditWikiEditsPart.js
+++ b/src/content/dependencies/generateArtistCreditWikiEditsPart.js
@@ -38,7 +38,6 @@ export default {
                     relations.contributionLinks.map(link =>
                       link.slots({
                         showAnnotation: slots.showAnnotation,
-                        trimAnnotation: true,
                         preventTooltip: true,
                         preventWrapping: true,
                       }))),
diff --git a/src/content/dependencies/generateCoverArtworkOriginDetails.js b/src/content/dependencies/generateCoverArtworkOriginDetails.js
index e489eea6..c8f51368 100644
--- a/src/content/dependencies/generateCoverArtworkOriginDetails.js
+++ b/src/content/dependencies/generateCoverArtworkOriginDetails.js
@@ -75,8 +75,6 @@ export default {
                 showChronology: true,
                 showWikiEdits: true,
 
-                trimAnnotation: false,
-
                 chronologyKind: 'coverArt',
 
                 normalStringKey: workingCapsule,
diff --git a/src/content/dependencies/generateReleaseInfoContributionsLine.js b/src/content/dependencies/generateReleaseInfoContributionsLine.js
index 4353ccf4..da54f8b8 100644
--- a/src/content/dependencies/generateReleaseInfoContributionsLine.js
+++ b/src/content/dependencies/generateReleaseInfoContributionsLine.js
@@ -20,8 +20,6 @@ export default {
       showChronology: true,
       showWikiEdits: true,
 
-      trimAnnotation: false,
-
       chronologyKind: slots.chronologyKind,
 
       normalStringKey: slots.stringKey,
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js
index aa9bdef9..46c07e5d 100644
--- a/src/content/dependencies/linkContribution.js
+++ b/src/content/dependencies/linkContribution.js
@@ -11,7 +11,7 @@ export default {
   }),
 
   data: (contribution) => ({
-    annotation: contribution.annotation,
+    annotationParts: contribution.annotationParts,
     urls: contribution.artist.urls,
   }),
 
@@ -22,8 +22,6 @@ export default {
     showExternalLinks: {type: 'boolean', default: false},
     showChronology: {type: 'boolean', default: false},
 
-    trimAnnotation: {type: 'boolean', default: false},
-
     preventWrapping: {type: 'boolean', default: false},
     preventTooltip: {type: 'boolean', default: false},
 
@@ -69,11 +67,9 @@ export default {
               }));
 
         const annotation =
-          (slots.trimAnnotation
-            ? data.annotation?.replace(/^edits for wiki(: )?/, '')
-            : data.annotation);
+          language.formatUnitList(data.annotationParts);
 
-        if (slots.showAnnotation && annotation) {
+        if (slots.showAnnotation && !html.isBlank(annotation)) {
           workingCapsule += '.withContribution';
           workingOptions.contrib = annotation;
         }