Fix regex for line content error handling

This commit is contained in:
StrangeDrVN
2026-07-14 14:28:49 +05:30
committed by GitHub
parent 69a1a22d4f
commit d165d7065f
+2 -2
View File
@@ -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++
}
})