diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-02-05 08:40:25 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-02-05 08:40:25 -0400 |
commit | f554897f3728fcb771fe26dffad898a54b37335a (patch) | |
tree | 993f747c1cc8d159b0e8072a2a20206c656d4c13 /src/data/yaml.js | |
parent | bbb9a3ad9c4626b4b9a2559d0e251d1fe1f5ef01 (diff) |
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.
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r-- | src/data/yaml.js | 12 |
1 files changed, 0 insertions, 12 deletions
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(':</i>')) { - throw new Error(`Missing commentary citation: "${lines[0].slice(0, 40)}..."`); - } - return text; - } else { - return null; - } -} - export function parseContributors(contributors) { if (!contributors) { return null; |