diff options
Diffstat (limited to 'libgo/go/csv/reader.go')
-rw-r--r-- | libgo/go/csv/reader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/csv/reader.go b/libgo/go/csv/reader.go index ea2c266a47d..29ceeae85b4 100644 --- a/libgo/go/csv/reader.go +++ b/libgo/go/csv/reader.go @@ -267,7 +267,7 @@ func (r *Reader) parseField() (haveField bool, delim int, err os.Error) { } if r.TrimLeadingSpace { - for unicode.IsSpace(rune) { + for rune != '\n' && unicode.IsSpace(rune) { rune, err = r.readRune() if err != nil { return false, 0, err @@ -355,7 +355,7 @@ func (r *Reader) parseField() (haveField bool, delim int, err os.Error) { c := r.column rune, err = r.readRune() if r.TrimLeadingSpace { - for unicode.IsSpace(rune) { + for rune != '\n' && unicode.IsSpace(rune) { rune, err = r.readRune() if err != nil { break |