strip spaces from the end of semicolons