mirror of
https://github.com/iptv-org/epg
synced 2026-09-10 05:46:54 -04:00
Fix regex for line content error handling
This commit is contained in:
@@ -34,12 +34,12 @@ async function main() {
|
|||||||
if (lineNum === lines.length && line.trim() === '') return
|
if (lineNum === lines.length && line.trim() === '') return
|
||||||
|
|
||||||
if (!line.endsWith('\r')) {
|
if (!line.endsWith('\r')) {
|
||||||
errors.push({ line: lineNum, type: 'missing_crlf', content: line.replace('\r', '') })
|
errors.push({ line: lineNum, type: 'missing_crlf', content: line.replace(/\r/g, '') })
|
||||||
totalErrors++
|
totalErrors++
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line.includes(' ')) {
|
if (line.includes(' ')) {
|
||||||
errors.push({ line: lineNum, type: 'contains_spaces', content: line.replace('\r', '') })
|
errors.push({ line: lineNum, type: 'contains_spaces', content: line.replace(/\r/g, '') })
|
||||||
totalErrors++
|
totalErrors++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user