retextjs/retext-spell

Ignore RegExp

agentofuser opened this issue · 3 comments

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/.

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?

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 :)

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