mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-25 09:41:49 +08:00
fix: wrong trim all white space lyric (#1233)
This commit is contained in:
parent
585691aa0f
commit
3cbb8d9b25
|
@ -28,7 +28,7 @@ export function parseLyric(lrc) {
|
|||
lrcObj.push({
|
||||
time: time,
|
||||
rawTime: timeRegExpArr[0],
|
||||
content: content.trim(),
|
||||
content: trimContent(content),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -36,3 +36,8 @@ export function parseLyric(lrc) {
|
|||
lrcObj.sort((a, b) => a.time - b.time);
|
||||
return lrcObj;
|
||||
}
|
||||
|
||||
function trimContent(content) {
|
||||
let t = content.trim();
|
||||
return t.length < 1 ? content : t;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user