|
|
@@ -57,19 +57,19 @@ export class LyricParser implements IParser {
|
|
|
offset = Number.parseInt(this.parseIdTag(line))
|
|
|
} else {
|
|
|
|
|
|
- // 新增:逐字歌词[]检测方括号逐字歌词格式 [mm:ss.xxx] 文字
|
|
|
+ // 新增逐字歌词解析逻辑[mm:ss.xx] <mm:ss.xx>
|
|
|
+ if (this.isWordByWordLyric(line)) {
|
|
|
+ const { timeline, words } = this.parseWordByWordLine(line, offset);
|
|
|
+ lyricLines.push(new LyricLine('', timeline, -1, words))
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 新增:逐字歌词[]检测方括号逐字歌词格式 [mm:ss.xxx] 文字
|
|
|
if (this.isSquareBracketWordByWordLyric(line)) {
|
|
|
const { timeline, words } = this.parseSquareBracketWordLine(line, offset);
|
|
|
if (words.length > 0) {
|
|
|
lyricLines.push(new LyricLine('', timeline, -1, words))
|
|
|
}
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- // 新增逐字歌词解析逻辑[mm:ss.xx] <mm:ss.xx>
|
|
|
- if (this.isWordByWordLyric(line)) {
|
|
|
- const { timeline, words } = this.parseWordByWordLine(line, offset);
|
|
|
- lyricLines.push(new LyricLine('', timeline, -1, words))
|
|
|
} else {
|
|
|
// 原逻辑处理,但支持逐字歌词
|
|
|
// [00:00.10]画心 - 张靓颖
|