From f554897f3728fcb771fe26dffad898a54b37335a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 5 Feb 2023 08:40:25 -0400 Subject: data format cleanup: commentary fields The parseCommentary function was actually going unused. This commit moves its behavior to the more appropriate location (validateCommentary), which actually unveils a couple data errors in the HSMusic data files. --- src/data/yaml.js | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/data/yaml.js') diff --git a/src/data/yaml.js b/src/data/yaml.js index 18f67c74..47cdc858 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -474,18 +474,6 @@ export function parseAdditionalFiles(array) { })); } -export function parseCommentary(text) { - if (text) { - const lines = String(text.trim()).split('\n'); - if (!lines[0].replace(/<\/b>/g, '').includes(':')) { - throw new Error(`Missing commentary citation: "${lines[0].slice(0, 40)}..."`); - } - return text; - } else { - return null; - } -} - export function parseContributors(contributors) { if (!contributors) { return null; -- cgit 1.3.0-6-gf8a5