mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-15 20:58:01 +00:00
fix: wrong trim all white space lyric (#1233)
This commit is contained in:
parent
585691aa0f
commit
3cbb8d9b25
1 changed files with 6 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue