mirror of
https://github.com/golang/go
synced 2024-11-05 17:46:16 -07:00
godoc: recognize examples with unordered output
A pared down verison of https://golang.org/cl/20458 that is compatible with Go 1.5. Fixes golang/go#10149 Change-Id: I550b097dc1cd65d0711bdea943f2b0678cfbc5fd Reviewed-on: https://go-review.googlesource.com/22032 Reviewed-by: Caleb Spare <cespare@gmail.com> Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
5e468032ea
commit
477d3b98e5
@ -587,7 +587,7 @@ func startsWithUppercase(s string) bool {
|
||||
return unicode.IsUpper(r)
|
||||
}
|
||||
|
||||
var exampleOutputRx = regexp.MustCompile(`(?i)//[[:space:]]*output:`)
|
||||
var exampleOutputRx = regexp.MustCompile(`(?i)//[[:space:]]*(unordered )?output:`)
|
||||
|
||||
// stripExampleSuffix strips lowercase braz in Foo_braz or Foo_Bar_braz from name
|
||||
// while keeping uppercase Braz in Foo_Braz.
|
||||
|
Loading…
Reference in New Issue
Block a user