Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show numbers as spelling errors #33

Closed
wants to merge 2 commits into from

Conversation

edemaine
Copy link

This is a fix for #32. I just check whether the word matches /^[0-9]+$/ and ignore it if so.

Along the way, I cleaned up the tokenizer to use regular expressions to detect word characters. This has two advantages:

  • Simpler code.
  • More efficient. Old code was checking "very long string".includes which will check against each character individually. Regular expressions should (I think) build a map to check for matching characters. Also, regular expressions should allow us to read the entire word at once instead of character by character.

@sparksuite-bot
Copy link
Collaborator

Thanks for helping to contribute to CodeMirror Spell Checker. However, it looks like you haven't read the Contributing Guidelines yet because you compared this PR against the master branch.

The most important guideline for contributing is to compare against the development branch when creating a pull request.

First, read the Contributing Guidelines. Then you can submit a new PR that compares your commits against the development branch. This PR will now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants