Enhanced whitespace parsing