Hey folks - I've been investigating reports that this module doesn't auto-detect the spellcheck language on macOS, which appears to be true based on some straightforward tests.
I think that the code in electron-spellchecker has been through a lot of iteration and improvement, but there's some whacky stuff going on around automatic language detection. Like this if statement - this else-if scenario will never fire with it ordered after the first case. I'm not sure I understand that comment, but it seems like this isn't quite right.
There's also an LRU cache which electron-spellcheck maintains on macOS, but if the NSSpellchecker is switching languages and the cache is never busted, things will just continue to be reported as misspelled:
Hey folks - I've been investigating reports that this module doesn't auto-detect the spellcheck language on macOS, which appears to be true based on some straightforward tests.
I think that the code in electron-spellchecker has been through a lot of iteration and improvement, but there's some whacky stuff going on around automatic language detection. Like this if statement - this else-if scenario will never fire with it ordered after the first case. I'm not sure I understand that comment, but it seems like this isn't quite right.
There's also an LRU cache which electron-spellcheck maintains on macOS, but if the NSSpellchecker is switching languages and the cache is never busted, things will just continue to be reported as misspelled: