Trim first before splitting