]> Cypherpunks repositories - gostls13.git/commit
go/printer, gofmt: handle raw string literals containing newlines better
authorRobert Griesemer <gri@golang.org>
Thu, 5 Apr 2018 23:04:56 +0000 (16:04 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 11 Apr 2018 22:03:18 +0000 (22:03 +0000)
commit70f5afa2104ac625190d65d6c19d83196e12482b
tree83131233a2a29d5505a8b98d9a2d77c1ec6373b6
parent2b7cfc515bae4c1d84265bef1feaea2f2f6896eb
go/printer, gofmt: handle raw string literals containing newlines better

A raw string containing newlines breaks whatever columns structure
has been established so far. Recognize the situation and force a
new section of alignment with the first line break seen after the
the raw string.

Applied gofmt to src and misc.

Fixes #9064.

Change-Id: I961e94b529b1fd421908311f366b113e2ec9b7f0
Reviewed-on: https://go-review.googlesource.com/105040
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/ssa/gen/386Ops.go
src/go/printer/printer.go
src/go/printer/testdata/linebreaks.golden
src/go/printer/testdata/linebreaks.input