From: Robert Griesemer Date: Fri, 22 May 2009 19:40:56 +0000 (-0700) Subject: - fix regexp once more in doc.go: X-Git-Tag: weekly.2009-11-06~1566 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=531e3fe311c01f8c5adb37517c3293f064880773;p=gostls13.git - 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 --- diff --git a/src/lib/go/doc/doc.go b/src/lib/go/doc/doc.go index fc890f07c7..59b511e8f0 100644 --- a/src/lib/go/doc/doc.go +++ b/src/lib/go/doc/doc.go @@ -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]*$"); }