mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-16 21:20:23 +08:00
fix(spellchecker): check both replacements of '_' and '-' in dictionary array
This commit is contained in:
parent
3ec81c5707
commit
8efb711bfe
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ class NylasSpellchecker
|
|||
isLanguageAvailable: (lang) =>
|
||||
return false unless lang
|
||||
dicts = @getAvailableDictionaries()
|
||||
return (lang in dicts) or (lang.split(/[-_]/)[0] in dicts)
|
||||
return (lang in dicts) or (lang.replace('_', '-') in dicts) or (lang.replace('-', '_') in dicts)
|
||||
|
||||
isSpelledCorrectly: (args...) => not @isMisspelled(args...)
|
||||
|
||||
|
|
Loading…
Reference in a new issue