Add some comments on the function 'getLinkTarget'

I add some comments on the function 'getLinkTarget' to explain its purpose, since I got confused when I first looked at this function. I am a beginner at GitHub and hope that helps! Thanks!