Commit 531e3fe3 authored by Robert Griesemer's avatar Robert Griesemer

- 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
parent 838cf124
...@@ -221,7 +221,7 @@ var ( ...@@ -221,7 +221,7 @@ var (
// TODO(rsc): Cannot use var initialization for regexps, // TODO(rsc): Cannot use var initialization for regexps,
// because Regexp constructor needs threads. // because Regexp constructor needs threads.
func setupRegexps() { func setupRegexps() {
comment_markers = makeRex("^[ \t]*(// ?| ?/\\* ?)"); comment_markers = makeRex("^/(/|\\*) ?");
trailing_whitespace = makeRex("[ \t\r]+$"); trailing_whitespace = makeRex("[ \t\r]+$");
comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$"); comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment