FormatSelections tries to call a nil function value if lw is nil
and the final entry in the selections array is non-nil. Luckily,
this doesn't actually happen in practice since godoc doesn't use
this combination (no line numbers, but with selections).
R=gri
CC=gobot, golang-dev
https://golang.org/cl/
6488106
break
}
// determine the kind of segment change
- if index == len(selections)-1 {
+ if lw != nil && index == len(selections)-1 {
// we have a link segment change:
// format the previous selection segment, write the
// link tag and start a new selection segment