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

Add option to ignore camelCase, PascalCase, snake_case, and kebab-case #132

Open
robellegate opened this issue Nov 4, 2019 · 2 comments

Comments

@robellegate
Copy link

I'm running into an issue where variable names that are being referenced in our documentation md files are being flagged as misspelled because they're using correctly spelled words separated by either underscores(_) or dashes(-).

Along the same lines, it would be nice if compound words in camelCase or PascalCase were ignored too. This might be a bit more difficult to do, but I suppose one method would be to check if there's a capital letter in the middle of a word, split the string into the n words that make up the compound string, and spell check those words.

@robellegate
Copy link
Author

It looks like spellcheck.js might already support words separated by dashes(-).
https://github.com/lukeapage/node-markdown-spellcheck/blob/master/es6/spellcheck.js#L68-L74

So support for snake_case should be just as easy to implement.

To support camelCase and PascalCase, I think it would require some regex magic for detecting letter case in the middle of words, but after that it should just be able to call the spellchecker on each subword like it currently does for words separated by dashes(-).

@m-mohr
Copy link

m-mohr commented Jun 30, 2020

But then, is fromLondon a typo (i.e. missing space) or a variable? I think variables should be put in an inline code blocks to not check them in spellcheck.

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

No branches or pull requests

2 participants