Simplification of parsing of links

I believe the original code in preprocessCode wasn't used to convert
a single link ever. Anyway, I think this change does not change the
functionality of the code... it just makes the code easier to read.