]> Cypherpunks repositories - gostls13.git/commitdiff
- fix regexp once more in doc.go:
authorRobert Griesemer <gri@golang.org>
Fri, 22 May 2009 19:40:56 +0000 (12:40 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 22 May 2009 19:40:56 +0000 (12:40 -0700)
  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

src/lib/go/doc/doc.go

index fc890f07c7c139b6e6e52279b0462b91f2ef85c9..59b511e8f023e59d5f28e945a679a0aec37ab6f3 100644 (file)
@@ -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]*$");
 }