From 531e3fe311c01f8c5adb37517c3293f064880773 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 22 May 2009 12:40:56 -0700 Subject: [PATCH] - 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 --- src/lib/go/doc/doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/go/doc/doc.go b/src/lib/go/doc/doc.go index fc890f07c7c..59b511e8f02 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]*$"); }