diff options
Diffstat (limited to 'src/data')
| -rw-r--r-- | src/data/things/Language.js | 3 | ||||
| -rw-r--r-- | src/data/yaml.js | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/data/things/Language.js b/src/data/things/Language.js index 7f3f43de..48ba0659 100644 --- a/src/data/things/Language.js +++ b/src/data/things/Language.js @@ -7,7 +7,6 @@ import * as html from '#html'; import {accumulateSum, empty, withEntries} from '#sugar'; import {isLanguageCode, isObject} from '#validators'; import Thing from '#thing'; -import {languageOptionRegex} from '#wiki-data'; import { externalLinkSpec, @@ -21,6 +20,8 @@ import {exitWithoutDependency, exposeConstant} from '#composite/control-flow'; import {flag, name} from '#composite/wiki-properties'; +const languageOptionRegex = /{(?<name>[A-Z0-9_]+)}/g; + export class Language extends Thing { static [Thing.getPropertyDescriptors] = () => ({ // Update & expose diff --git a/src/data/yaml.js b/src/data/yaml.js index 2afaffb5..0a7fce93 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -13,7 +13,7 @@ import {parseContentNodes, splitContentNodesAround} from '#replacer'; import {sortByName} from '#sort'; import Thing from '#thing'; import thingConstructors from '#things'; -import {matchContentEntries, multipleLyricsDetectionRegex} from '#wiki-data'; +import {matchContentEntries} from '#wiki-data'; import { aggregateThrows, @@ -1055,10 +1055,7 @@ export function parseReferencingSources(value, {subdoc, ReferencingSourcesEntry} } export function parseLyrics(value, {subdoc, LyricsEntry}) { - if ( - typeof value === 'string' && - !multipleLyricsDetectionRegex.test(value) - ) { + if (typeof value === 'string' && !/^<i>.*:<\/i>/m.test(value)) { const document = {'Body': value}; return [subdoc(LyricsEntry, document, {bindInto: 'thing'})]; |