Improve whitespace handling for FormattedStringParser