Modify the template to avoid unnecessary link breaks