Improved whitespace matching