For readability, simply assign to nameLink in each branch (rather than using +=) -- that is, move the "<a href='#s-" suffix into this line.