diff --git a/src/validation/space/space-validator.js b/src/validation/space/space-validator.js index 189b25f..f147bbb 100644 --- a/src/validation/space/space-validator.js +++ b/src/validation/space/space-validator.js @@ -9,7 +9,7 @@ const validate = (line, lineNumber, editorconfig) => { } } - if (!line.match(/^ *[^\s]+/)) { + if (!line.match(/^ *[\S\r\n]+/)) { return `${lineNumber}: Mixed indentation (only spaces expected)`; } } diff --git a/src/validation/tab/tab-validator.js b/src/validation/tab/tab-validator.js index b8c4b2d..28a87e5 100644 --- a/src/validation/tab/tab-validator.js +++ b/src/validation/tab/tab-validator.js @@ -2,7 +2,7 @@ const validate = (line, lineNumber, editorconfig) => { if (line.length > 0 && editorconfig.indent_style === 'tab') { // Starts with tab character * (none, one or more) // and everything but whitespace or space and * (block comment) - if (!line.match(/^\t*([^\s]+| \*)/)) { + if (!line.match(/^\t*([\S\r\n]+| \*)/)) { return `${lineNumber}: Mixed indentation (only tabs expected)`; } }