Fix regex for line content error handling
This commit is contained in:
1 parent
69a1a22d4f
commit
d165d7065f
1 file changed
+2
-2
@@ -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