]> Cypherpunks repositories - gostls13.git/commit
go/printer/gofmt: remove special case for multi-line raw strings
authorRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2011 01:30:59 +0000 (18:30 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2011 01:30:59 +0000 (18:30 -0700)
commit1afc37fa7eb5bcc48a72646357a497973b5a2c1e
treee2f85be45a38aff0bfdbef292107acf8d0b6965b
parentd54c4ecc329c22a8a79dd4d91a4df8bf41920bf4
go/printer/gofmt: remove special case for multi-line raw strings

As a special case, multi-line raw strings (i.e., strings in `` quotes)
were not indented if they were the only token on a line. This heuristic
was meant to improve formatting for multi-line raw strings where sub-
sequent lines are not indented at the level of the surrounding code.
Multiple people have complained about this. Removing the heuristic
again because it makes the formatting more regular, easier to under-
stand, and simplifies the implementation.

- manual changes to ebnf/ebnf_test.go for readability
- gofmt -w src misc

Fixes #1643.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4307045
src/cmd/gofix/httpserver.go
src/cmd/gofix/netdial.go
src/cmd/gofix/procattr.go
src/pkg/ebnf/ebnf_test.go
src/pkg/go/printer/printer.go
src/pkg/go/printer/testdata/expressions.golden
src/pkg/go/printer/testdata/expressions.input
src/pkg/go/printer/testdata/expressions.raw