diff options
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r-- | src/data/yaml.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index 86f30143..5026a97e 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -393,7 +393,16 @@ export function parseContributors(contributionStrings) { return contributionStrings.map(item => { if (typeof item === 'object' && item['Who']) - return {who: item['Who'], what: item['What'] ?? null}; + return { + artist: item['Who'], + annotation: item['What'] ?? null, + }; + + if (typeof item === 'object' && item['Artist']) + return { + artist: item['Artist'], + annotation: item['Annotation'] ?? null, + }; if (typeof item !== 'string') return item; @@ -401,8 +410,8 @@ export function parseContributors(contributionStrings) { if (!match) return item; return { - who: match.groups.main, - what: match.groups.accent ?? null, + artist: match.groups.main, + annotation: match.groups.accent ?? null, }; }); } |