Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(319)

Issue 12142043: code review 12142043: fmt: treat \r\n as \n in Scan (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by r
Modified:
11 years, 7 months ago
Reviewers:
dsymonds
CC:
golang-dev, dsymonds
Visibility:
Public.

Description

fmt: treat \r\n as \n in Scan When scanning input and "white space" is permitted, a carriage return followed immediately by a newline (\r\n) is treated exactly the same as a plain newline (\n). I hope this makes it work better on Windows. We do it everywhere, not just on Windows, since why not? Fixes issue 5391.

Patch Set 1 #

Patch Set 2 : diff -r 2faab4336bf1 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -0 lines) Patch
M src/pkg/fmt/doc.go View 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/fmt/scan.go View 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/fmt/scan_test.go View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 7 months ago (2013-07-31 04:32:48 UTC) #1
dsymonds
LGTM
11 years, 7 months ago (2013-07-31 04:33:51 UTC) #2
r
11 years, 7 months ago (2013-07-31 05:00:14 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=0d2398504967 ***

fmt: treat \r\n as \n in Scan
When scanning input and "white space" is permitted, a carriage return
followed immediately by a newline (\r\n) is treated exactly the same
as a plain newline (\n). I hope this makes it work better on Windows.

We do it everywhere, not just on Windows, since why not?

Fixes issue 5391.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/12142043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b