Unit conversion handles trailing whitespace