tbroadley / spellchecker-cli

A command-line tool for spellchecking files.
MIT License
119 stars 16 forks source link

Allow adding regex flags to entries in non-JS personal dictionaries #47

Closed LukasMeine closed 2 years ago

LukasMeine commented 4 years ago

Tried to do that, no luck so far.

tbroadley commented 4 years ago

Thanks for opening an issue! Have you tried using a JavaScript dictionary? I've just opened a PR that adds a test demonstrating how to do this: https://github.com/tbroadley/spellchecker-cli/pull/48/files#diff-49f23d892b92c38858de495540d16087

LukasMeine commented 4 years ago

Dint't try with js, but did with a txt dictionary, and it didn't work.

tbroadley commented 4 years ago

Understood. Neither text dictionaries nor the --ignore command line flag support case-insensitive regexes right now. I would be open to a PR that adds this functionality, probably by allowing users to specify a regex of the form /caseinsensitive/i in these places. However, I don't think I'll have time to implement this change myself.

LukasMeine commented 4 years ago

No worries, I can submit a PR adding this once I get some free time if you like.

LukasMeine commented 4 years ago

Also, would you mind adding a license file to this project?

tbroadley commented 4 years ago

No worries, I can submit a PR adding this once I get some free time if you like.

That'd be wonderful, thank you!

Also, would you mind adding a license file to this project?

Good call. https://github.com/tbroadley/spellchecker-cli/pull/52

tbroadley commented 2 years ago

I thought about this more and I think that, since JS dictionaries support regular expressions with flags, it doesn't make sense to add support for them to non-JS dictionaries.