Skip to content

Commit

Permalink
linebreak-style: handle explicit default
Browse files Browse the repository at this point in the history
Closes GH-176.
Closes GH-175.
  • Loading branch information
Planeshifter authored and wooorm committed Apr 5, 2018
1 parent 885cfd7 commit 5372fdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/remark-lint-linebreak-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ function linebreakStyle(ast, file, preferred) {
var index = content.indexOf('\n');
var type;

preferred = typeof preferred !== 'string' || preferred === 'consistent' ? null : preferred;

while (index !== -1) {
type = content.charAt(index - 1) === '\r' ? 'windows' : 'unix';

Expand Down

0 comments on commit 5372fdb

Please sign in to comment.