Skip to content

Commit

Permalink
correctly strip EOL characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Mornini committed Feb 14, 2018
1 parent 1e36df6 commit 90528d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion type-file.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func (f *file) readLine() (string, error) {

f.LineNumber++

inputText = strings.TrimSpace(inputText)
inputText = strings.TrimSuffix(inputText, "\n")
inputText = strings.TrimSuffix(inputText, "\r")

return inputText, nil
}
Expand Down

0 comments on commit 90528d9

Please sign in to comment.