retextjs / retext-spell

plugin to check spelling
https://unifiedjs.com
MIT License
73 stars 16 forks source link

Ignore RegExp #17

Closed agentofuser closed 5 years ago

agentofuser commented 5 years ago

Would there be interest in a PR allowing regexps as well as strings in the ignore array?

Example use-case: ignoring names of html headings like /h\d/.

wooorm commented 5 years ago

Maybe, yeah, I think that could make sense.

It would add some more logic (dropping the lodash function, iterating over all values in ignore, and then testing them all), and it’s not super important because it’s already possible to provide ['h1', 'h2', ...].

And last, did you look at providing a personal dictionary?

agentofuser commented 5 years ago

Yeah, I also feel weird mixing types in the same array. My use case doesn't justify the added complexity/inelegance. Also yes, personal dictionaries are great :)

wooorm commented 5 years ago

Alright, thanks for the issue though, please raise more if you run into other things!