Remove trailing horizontal/vertical whitespace.