Skip to content

Commit

Permalink
support \r\n (windows newline) for safety (ref. #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Apr 10, 2019
1 parent 5a1a81c commit 8797087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function create_leelaz () {
const each_line = (f) => {
let buf = ''
return stream => {
const a = stream.toString().split('\n'), rest = a.pop()
const a = stream.toString().split(/\r?\n/), rest = a.pop()
!empty(a) && (a[0] = buf + a[0], buf = '', a.forEach(f))
buf += rest
}
Expand Down

0 comments on commit 8797087

Please sign in to comment.