Rewrote parseLink in js consistent with the C and spec.