diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-04-08 08:48:24 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-04-13 22:54:15 -0300 |
commit | a166bca8aef15855dea545e8335068f8e6714fc7 (patch) | |
tree | 0909351e74234b6be09463442f4176baa955d7eb /src/validators.js | |
parent | 48dde4a388fd4c31dd5680f7535419874124e554 (diff) |
wip 2
Diffstat (limited to 'src/validators.js')
-rw-r--r-- | src/validators.js | 12 |
1 files changed, 8 insertions, 4 deletions
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 (/^<i>/m.test(content)) { + if (oldStyleLyricsDetectionRegex.test(content)) { throw new TypeError( - `Expected old-style lyrics block not to include <i> at start of any line`); + `Expected old-style lyrics block not to include "<i> ... :</i>" at start of any line`); } return true; |