mirror of
https://github.com/golang/go
synced 2024-11-18 16:54:43 -07:00
- fix regexp once more in doc.go:
comment markers must only be stripped if they are at the very beginning otherwise comments that contain code with comments get screwed up (the ast delivers clean comments with no junk before or after) - fix indentation in google/net/rpc/rpc.go which screwed up godoc formatting R=rsc DELTA=3 (0 added, 0 deleted, 3 changed) OCL=29223 CL=29267
This commit is contained in:
parent
838cf124f0
commit
531e3fe311
@ -221,7 +221,7 @@ var (
|
||||
// TODO(rsc): Cannot use var initialization for regexps,
|
||||
// because Regexp constructor needs threads.
|
||||
func setupRegexps() {
|
||||
comment_markers = makeRex("^[ \t]*(// ?| ?/\\* ?)");
|
||||
comment_markers = makeRex("^/(/|\\*) ?");
|
||||
trailing_whitespace = makeRex("[ \t\r]+$");
|
||||
comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user