From a166bca8aef15855dea545e8335068f8e6714fc7 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 8 Apr 2025 08:48:24 -0300 Subject: wip 2 --- src/validators.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/validators.js') diff --git a/src/validators.js b/src/validators.js index 5300d4ad..6badc93a 100644 --- a/src/validators.js +++ b/src/validators.js @@ -3,8 +3,12 @@ import {inspect as nodeInspect} from 'node:util'; import {openAggregate, withAggregate} from '#aggregate'; import {colors, ENABLE_COLOR} from '#cli'; import {cut, empty, matchMultiline, typeAppearance} from '#sugar'; -import {commentaryRegexCaseInsensitive, commentaryRegexCaseSensitiveOneShot} - from '#wiki-data'; + +import { + commentaryRegexCaseInsensitive, + commentaryRegexCaseSensitiveOneShot, + oldStyleLyricsDetectionRegex, +} from '#wiki-data'; function inspect(value) { return nodeInspect(value, {colors: ENABLE_COLOR}); @@ -371,9 +375,9 @@ export const isCommentary = export function isOldStyleLyrics(content) { isContentString(content); - if (/^/m.test(content)) { + if (oldStyleLyricsDetectionRegex.test(content)) { throw new TypeError( - `Expected old-style lyrics block not to include at start of any line`); + `Expected old-style lyrics block not to include " ... :" at start of any line`); } return true; -- cgit 1.3.0-6-gf8a5