Trim start and end dashes in anchors