support lyric in enhanced format

This commit is contained in:
DIYgod 2018-03-08 18:25:53 +08:00
parent 7b9074ffd0
commit 44ff1c8ff7
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 1 additions and 1 deletions

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