// Selection is ignored.
//
func FormatSelections(w io.Writer, text []byte, lw LinkWriter, links Selection, sw SegmentWriter, selections ...Selection) {
+ // If we have a link writer, make the links
+ // selection the last entry in selections
if lw != nil {
selections = append(selections, links)
}
}
// determine the kind of segment change
if lw != nil && index == len(selections)-1 {
- // we have a link segment change:
+ // we have a link segment change (see start of this function):
// format the previous selection segment, write the
// link tag and start a new selection segment
segment(offs)