Skip to content

Commit 31f5069

Browse files
UziTechwooorm
authored andcommitted
Fix CRLF line-endings in hard-break-spaces
Closes GH-55 Closes GH-56
1 parent 63d24e7 commit 31f5069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/hard-break-spaces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function hardBreakSpaces(ast, file, preferred, done) {
4949
return;
5050
}
5151

52-
value = contents.slice(start, end).split('\n', 1)[0];
52+
value = contents.slice(start, end).split('\n', 1)[0].replace(/\r$/, '');
5353

5454
if (value.length > 2) {
5555
file.warn('Use two spaces for hard line breaks', node);

0 commit comments

Comments
 (0)