From 3e579167d0b8c52aa31b1136aaa22aa64f11d12b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Nov 2025 15:56:40 -0400 Subject: data: Content: chop almost everything --- .../things/content/withAnnotationPartNodeLists.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/data/composite/things/content/withAnnotationPartNodeLists.js (limited to 'src/data/composite/things/content/withAnnotationPartNodeLists.js') diff --git a/src/data/composite/things/content/withAnnotationPartNodeLists.js b/src/data/composite/things/content/withAnnotationPartNodeLists.js new file mode 100644 index 00000000..fc304594 --- /dev/null +++ b/src/data/composite/things/content/withAnnotationPartNodeLists.js @@ -0,0 +1,28 @@ +import {input, templateCompositeFrom} from '#composite'; + +import {raiseOutputWithoutDependency} from '#composite/control-flow'; +import {splitContentNodesAround, withContentNodes} from '#composite/wiki-data'; + +export default templateCompositeFrom({ + annotation: `withAnnotationPartNodeLists`, + + outputs: ['#annotationPartNodeLists'], + + steps: () => [ + raiseOutputWithoutDependency({ + dependency: 'annotation', + output: input.value({'#annotationPartNodeLists': []}), + }), + + withContentNodes({ + from: 'annotation', + }), + + splitContentNodesAround({ + nodes: '#contentNodes', + around: input.value(/, */g), + }).outputs({ + '#contentNodeLists': '#annotationPartNodeLists', + }), + ], +}); -- cgit 1.3.0-6-gf8a5