Fix redundant \n when "link" exists but "def" not.