Skip to content

Commit cc412cd

Browse files
committed
internal/symbol: support package paths with hyphens
parseRow is updated to support package paths with hyphens. For golang/go#37102 Change-Id: I9ba6a9928a8f11779ff025cb68ca0c287506403f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/340090 Trust: Julie Qiu <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
1 parent 3b3a693 commit cc412cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/symbol/apigodoc.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ func parseRow(s string) (vr versionedRow, ok bool) {
179179
return
180180
}
181181
rest := s[len("pkg "):]
182-
endPkg := strings.IndexFunc(rest, func(r rune) bool { return !(unicode.IsLetter(r) || r == '.' || r == '/' || unicode.IsDigit(r)) })
182+
endPkg := strings.IndexFunc(rest, func(r rune) bool {
183+
return !(unicode.IsLetter(r) || r == '.' || r == '/' || r == '-' || unicode.IsDigit(r))
184+
})
183185
if endPkg == -1 {
184186
return
185187
}

0 commit comments

Comments
 (0)