Skip to content

Commit

Permalink
fix 🐛 : fix error for txt source
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbertHe committed Mar 3, 2024
1 parent 8fde3d3 commit ce09d68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/utils/m3u2txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ export const m3u2txt = (m3uArray: string[]) => {
if (groups.has(g)) {
groups.set(
g,
`${groups.get(g)}${reg[2].trim()},${m3uArray[i + 1]}\n`
`${groups.get(g)}${reg[2].trim().replace(/\s+/g, "_")},${
m3uArray[i + 1]
}\n`
)
} else {
groups.set(g, `${reg[2].trim()},${m3uArray[i + 1]}\n`)
groups.set(
g,
`${reg[2].trim().replace(/\s+/g, "_")},${m3uArray[i + 1]}\n`
)
}
}

Expand Down

0 comments on commit ce09d68

Please sign in to comment.