mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[grazie] IJPL-224218 Adjust number of tokens
GitOrigin-RevId: 8a66ca3a5b408907aee7d6edd9deba27794fd61c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f87999b305
commit
498dd67191
@@ -63,7 +63,8 @@ class GrazieCheckers(coroutineScope: CoroutineScope) : GrazieStateLifecycle {
|
||||
return synchronized(speller) {
|
||||
computeWithClassLoader<Boolean, Throwable>(GraziePlugin.classLoader) {
|
||||
val sentence = tool.getRawAnalyzedSentence(word)
|
||||
if (sentence.nonWhitespaceTokenCount == 1) return@computeWithClassLoader !speller.isMisspelled(word)
|
||||
// First token is always sentence start
|
||||
if (sentence.nonWhitespaceTokenCount <= 2) return@computeWithClassLoader !speller.isMisspelled(word)
|
||||
if (speller.match(sentence).isEmpty()) {
|
||||
if (!speller.isMisspelled(word)) true
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user