Fix trailing \n when copying to clipboard.