making sure spaces and tabs are skipped when ignoring whitespace