Fix whitespace parsing in directive parser