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