mirror of
https://github.com/golang/go
synced 2024-11-18 20:34:39 -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:
parent
ad8527c4dc
commit
fad7791b07
@ -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("^[ \t]*(// ?| ?/\\* ?)");
|
||||||
trailing_whitespace = makeRex("[ \t\r]+$");
|
trailing_whitespace = makeRex("[ \t\r]+$");
|
||||||
comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$");
|
comment_junk = makeRex("^[ \t]*(/\\*|\\*/)[ \t]*$");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user