diff --git a/lib/rules/hard-break-spaces.js b/lib/rules/hard-break-spaces.js index c98d6005..c48a0881 100644 --- a/lib/rules/hard-break-spaces.js +++ b/lib/rules/hard-break-spaces.js @@ -49,7 +49,7 @@ function hardBreakSpaces(ast, file, preferred, done) { return; } - value = contents.slice(start, end).split('\n', 1)[0]; + value = contents.slice(start, end).split('\n', 1)[0].replace(/\r$/, ''); if (value.length > 2) { file.warn('Use two spaces for hard line breaks', node);