update match
parent
76d32c1cb4
commit
959df65e0a
|
@ -23,8 +23,9 @@ const parseExtendedLyric = (lrcLinesMap, extendedLyric) => {
|
||||||
if (text) {
|
if (text) {
|
||||||
const times = timeField.match(timeExp)
|
const times = timeField.match(timeExp)
|
||||||
if (times == null) continue
|
if (times == null) continue
|
||||||
for (const time of times) {
|
for (let time of times) {
|
||||||
const timeStr = time.replace(/(?:\.0+|(\.\d+?)0+)$/, '$1')
|
if (!time.includes('.')) time += '.0'
|
||||||
|
const timeStr = time.replace(/(?:\.0+|0+)$/, '')
|
||||||
const targetLine = lrcLinesMap[timeStr]
|
const targetLine = lrcLinesMap[timeStr]
|
||||||
if (targetLine) targetLine.extendedLyrics.push(text)
|
if (targetLine) targetLine.extendedLyrics.push(text)
|
||||||
}
|
}
|
||||||
|
@ -82,8 +83,9 @@ module.exports = class LinePlayer {
|
||||||
if (text) {
|
if (text) {
|
||||||
const times = timeField.match(timeExp)
|
const times = timeField.match(timeExp)
|
||||||
if (times == null) continue
|
if (times == null) continue
|
||||||
for (const time of times) {
|
for (let time of times) {
|
||||||
const timeStr = time.replace(/(?:\.0+|(\.\d+?)0+)$/, '$1')
|
if (!time.includes('.')) time += '.0'
|
||||||
|
const timeStr = time.replace(/(?:\.0+|0+)$/, '')
|
||||||
if (linesMap[timeStr]) {
|
if (linesMap[timeStr]) {
|
||||||
linesMap[timeStr].extendedLyrics.push(text)
|
linesMap[timeStr].extendedLyrics.push(text)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue