Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
LGTM
*** Submitted as http://code.google.com/p/go/source/detail?r=71176fa999ce *** update the tree to use the new regexp methods R=rsc CC=golang-dev http://codereview.appspot.com/1983043
This CL breaks godoc. Fix forthcoming. http://codereview.appspot.com/1983043/diff/4001/5001 File src/cmd/godoc/codewalk.go (right): http://codereview.appspot.com/1983043/diff/4001/5001#newcode455 src/cmd/godoc/codewalk.go:455: if len(m) > 0 { if m != nil { // len(m) == 2 http://codereview.appspot.com/1983043/diff/4001/5002 File src/cmd/godoc/godoc.go (right): http://codereview.appspot.com/1983043/diff/4001/5002#newcode946 src/cmd/godoc/godoc.go:946: m := rx.Find(src) This is wrong. It should be FindAllIndex. http://codereview.appspot.com/1983043/diff/4001/5004 File src/pkg/go/doc/comment.go (right): http://codereview.appspot.com/1983043/diff/4001/5004#newcode202 src/pkg/go/doc/comment.go:202: m := matchRx.Find(line) This is wrong. It should be FindAllIndex. http://codereview.appspot.com/1983043/diff/4001/5005 File src/pkg/go/doc/doc.go (right): http://codereview.appspot.com/1983043/diff/4001/5005#newcode312 src/pkg/go/doc/doc.go:312: if m := bug_markers.Find(text); m != nil { This is wrong. It should be FindIndex.
http://codereview.appspot.com/1983043/diff/4001/5002 File src/cmd/godoc/godoc.go (right): http://codereview.appspot.com/1983043/diff/4001/5002#newcode946 src/cmd/godoc/godoc.go:946: m := rx.Find(src) On 2010/08/12 17:11:45, gri wrote: > This is wrong. It should be FindAllIndex. I think you mean FindSubmatchIndex. But instead could be FindSubmatch and then use string(m[1]) below. http://codereview.appspot.com/1983043/diff/4001/5004 File src/pkg/go/doc/comment.go (right): http://codereview.appspot.com/1983043/diff/4001/5004#newcode202 src/pkg/go/doc/comment.go:202: m := matchRx.Find(line) On 2010/08/12 17:11:45, gri wrote: > This is wrong. It should be FindAllIndex. FindSubmatchIndex.