« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/things/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/content')
-rw-r--r--src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js1
-rw-r--r--src/data/composite/things/content/withAnnotationParts.js13
-rw-r--r--src/data/composite/things/content/withSourceText.js1
-rw-r--r--src/data/composite/things/content/withSourceURLs.js1
4 files changed, 12 insertions, 4 deletions
diff --git a/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js b/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
index 62799d43..69da8c75 100644
--- a/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
+++ b/src/data/composite/things/content/helpers/withExpressedOrImplicitArtistReferences.js
@@ -52,6 +52,7 @@ export default templateCompositeFrom({
     withMappedList({
       list: '#artistTags',
       map: input.value(node =>
+        'artist:' +
         node.data.replacerValue[0].data),
     }).outputs({
       '#mappedList': '#artistReferences',
diff --git a/src/data/composite/things/content/withAnnotationParts.js b/src/data/composite/things/content/withAnnotationParts.js
index 5eb8e3d5..0c5a0294 100644
--- a/src/data/composite/things/content/withAnnotationParts.js
+++ b/src/data/composite/things/content/withAnnotationParts.js
@@ -1,6 +1,5 @@
 import {input, templateCompositeFrom} from '#composite';
-import {parseContentNodes} from '#replacer';
-import {transposeArrays} from '#sugar';
+import {empty, transposeArrays} from '#sugar';
 import {is} from '#validators';
 
 import {raiseOutputWithoutDependency} from '#composite/control-flow';
@@ -34,6 +33,16 @@ export default templateCompositeFrom({
     }),
 
     {
+      dependencies: ['#contentNodeLists'],
+      compute: (continuation, {
+        ['#contentNodeLists']: nodeLists,
+      }) => continuation({
+        ['#contentNodeLists']:
+          nodeLists.filter(list => !empty(list)),
+      }),
+    },
+
+    {
       dependencies: ['#contentNodeLists', input('mode')],
       compute: (continuation, {
         ['#contentNodeLists']: nodeLists,
diff --git a/src/data/composite/things/content/withSourceText.js b/src/data/composite/things/content/withSourceText.js
index d310e8ea..292306b7 100644
--- a/src/data/composite/things/content/withSourceText.js
+++ b/src/data/composite/things/content/withSourceText.js
@@ -1,5 +1,4 @@
 import {input, templateCompositeFrom} from '#composite';
-import {parseContentNodes} from '#replacer';
 
 import {raiseOutputWithoutDependency} from '#composite/control-flow';
 
diff --git a/src/data/composite/things/content/withSourceURLs.js b/src/data/composite/things/content/withSourceURLs.js
index f1e8dbc0..f85ff9ea 100644
--- a/src/data/composite/things/content/withSourceURLs.js
+++ b/src/data/composite/things/content/withSourceURLs.js
@@ -1,5 +1,4 @@
 import {input, templateCompositeFrom} from '#composite';
-import {parseContentNodes} from '#replacer';
 
 import {raiseOutputWithoutDependency} from '#composite/control-flow';
 import {withFilteredList, withMappedList} from '#composite/data';