« get me outta code hell

data: matchCommentaryEntries -> matchContentEntries - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/common-util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-04-14 21:30:38 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-04-16 13:03:15 -0300
commitd755391cbe84ecccb7af1b821fb792868285cb2a (patch)
tree6147cd9588eac9602a80c8ac748af03180ca7956 /src/common-util
parent3d041361ce5aded863fd8791fb3dd011879a48ef (diff)
data: matchCommentaryEntries -> matchContentEntries
Diffstat (limited to 'src/common-util')
-rw-r--r--src/common-util/wiki-data.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common-util/wiki-data.js b/src/common-util/wiki-data.js
index 8ad51d6a..a4c6b3bd 100644
--- a/src/common-util/wiki-data.js
+++ b/src/common-util/wiki-data.js
@@ -107,14 +107,14 @@ export const commentaryRegexCaseSensitiveOneShot =
 export const multipleLyricsDetectionRegex =
   /^<i>.*:<\/i>/m;
 
-export function matchContentEntries(sourceText, caseSensitiveRegex) {
+export function matchContentEntries(sourceText) {
   const matchEntries = [];
 
   let previousMatchEntry = null;
   let previousEndIndex = null;
 
   for (const {0: matchText, index: startIndex, groups: matchEntry}
-          of sourceText.matchAll(caseSensitiveRegex)) {
+          of sourceText.matchAll(commentaryRegexCaseSensitive)) {
     if (previousMatchEntry) {
       previousMatchEntry.body = sourceText.slice(previousEndIndex, startIndex);
     }
@@ -132,10 +132,6 @@ export function matchContentEntries(sourceText, caseSensitiveRegex) {
   return matchEntries;
 }
 
-export function matchCommentaryEntries(sourceText) {
-  return matchContentEntries(sourceText, commentaryRegexCaseSensitive)
-}
-
 export function filterAlbumsByCommentary(albums) {
   return albums
     .filter((album) => [album, ...album.tracks].some((x) => x.commentary));