Fixing parsing of endlines in parseLinks