support lyric in enhanced format

This commit is contained in:
DIYgod
2018-03-08 18:25:53 +08:00
parent 7b9074ffd0
commit 44ff1c8ff7
+1 -1
View File
@@ -87,7 +87,7 @@ class Lrc {
// match lrc time
const lrcTimes = lyric[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
// match lrc text
const lrcText = lyric[i].replace(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, '').replace(/^\s+|\s+$/g, '');
const lrcText = lyric[i].replace(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, '').replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, '').replace(/^\s+|\s+$/g, '');
if (lrcTimes) {
// handle multiple time tag