mirror of
https://github.com/iptv-org/epg
synced 2026-09-06 03:49:49 -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 (!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++
|
||||
}
|
||||
|
||||
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++
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user