1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:14:46 -07:00

fix regexp to strip comment markers

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29221
CL=29221
This commit is contained in:
Robert Griesemer 2009-05-21 20:29:22 -07:00
parent ad8527c4dc
commit fad7791b07

View 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("^[ \t]*(// ?| ?/\\* ?)");
trailing_whitespace = makeRex("[ \t\r]+$");
comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$");
}