|
|
@@ -40,7 +40,11 @@ export class LyricParser implements IParser {
|
|
|
}
|
|
|
|
|
|
// 检查是否是需要忽略的标签
|
|
|
- const shouldIgnore = ignoredTags.some(tag => line.indexOf(tag) > 0);
|
|
|
+ // 修改后的标签检测逻辑:只有在[]中的标签才忽略
|
|
|
+ const shouldIgnore = ignoredTags.some(tag => {
|
|
|
+ const tagPattern = new RegExp(`\\[${tag}[^\\]]*\\]`, 'i'); // 匹配[tag...]格式,忽略大小写
|
|
|
+ return tagPattern.test(line);
|
|
|
+ });
|
|
|
if (shouldIgnore) {
|
|
|
printW(`the lyric line contains ignored tag, line index= ${i}`);
|
|
|
continue;
|