« get me outta code hell

wiki-data: uber-simplify matchContentEntries - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/yaml.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-01-31 17:04:16 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-31 17:04:16 -0400
commitb45c33241cbb559e493fb19a8e775326d69b3d6f (patch)
tree0f6a3c7dc6e70e163605aa321c4d3e7cb6615cbe /src/data/yaml.js
parent6c32e484a4ad6be5690c1083b9131d0338e3c5b9 (diff)
wiki-data: uber-simplify matchContentEntries
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r--src/data/yaml.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 0a7fce93..85c05b93 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -945,7 +945,7 @@ export function parseContentEntriesFromSourceText(thingClass, sourceText, {subdo
     const artistTextNodes =
       Array.from(
         splitContentNodesAround(
-          parseContentNodes(matchEntry.artistText),
+          parseContentNodes(matchEntry.artists),
           /\|/g));
 
     const separatorIndices =
@@ -955,9 +955,9 @@ export function parseContentEntriesFromSourceText(thingClass, sourceText, {subdo
 
     if (empty(separatorIndices)) {
       if (artistTextNodes.length === 1 && artistTextNodes[0].type === 'text') {
-        artistReferences = matchEntry.artistText;
+        artistReferences = matchEntry.artists;
       } else {
-        artistText = matchEntry.artistText;
+        artistText = matchEntry.artists;
       }
     } else {
       const firstSeparatorIndex =
@@ -968,12 +968,12 @@ export function parseContentEntriesFromSourceText(thingClass, sourceText, {subdo
         artistTextNodes.length;
 
       artistReferences =
-        matchEntry.artistText.slice(
+        matchEntry.artists.slice(
           artistTextNodes.at(0).i,
           artistTextNodes.at(firstSeparatorIndex - 1).iEnd);
 
       artistText =
-        matchEntry.artistText.slice(
+        matchEntry.artists.slice(
           artistTextNodes.at(firstSeparatorIndex).iEnd,
           artistTextNodes.at(secondSeparatorIndex - 1).iEnd);
     }
@@ -1016,7 +1016,7 @@ export function parseContentEntriesFromSourceText(thingClass, sourceText, {subdo
   }
 
   const documents =
-    matchContentEntries(sourceText)
+    Array.from(matchContentEntries(sourceText))
       .map(matchEntry =>
         withEntries(
           map(matchEntry),