tweak heuristic for detecting multi-line links (fixes issue 2487)