Added support for \r as new line character
diff --git a/decoder_test.go b/decoder_test.go index 025aa3f..9be226d 100644 --- a/decoder_test.go +++ b/decoder_test.go
@@ -99,7 +99,7 @@ whitespace := []string{" ", "\f", "\t"} delimiters := []string{"", "=", ":"} // newlines := []string{"", "\r", "\n", "\r\n"} - newlines := []string{"", "\n"} + newlines := []string{"", "\n", "\r"} for _, dl := range delimiters { for _, ws1 := range whitespace { for _, ws2 := range whitespace {
diff --git a/lex.go b/lex.go index 196fed1..aa9b6f0 100644 --- a/lex.go +++ b/lex.go
@@ -382,7 +382,7 @@ // isEOL reports whether we are at a new line character. func isEOL(r rune) bool { - return r == '\n' + return r == '\n' || r == '\r' } // isEscape reports whether the rune is the escape character which