From dd5f1430196a3f6fc406eb8188a54037d0b677a0 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Wed, 29 Jul 2015 21:33:59 +0300 Subject: [PATCH] skip shorter entities too #WEB-17454 fixed --- .../src/com/intellij/spellchecker/inspections/WordSplitter.java | 2 +- .../com/intellij/spellchecker/inspector/SplitterTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spellchecker/src/com/intellij/spellchecker/inspections/WordSplitter.java b/spellchecker/src/com/intellij/spellchecker/inspections/WordSplitter.java index fc24ee2d0a61..e4290d578d59 100644 --- a/spellchecker/src/com/intellij/spellchecker/inspections/WordSplitter.java +++ b/spellchecker/src/com/intellij/spellchecker/inspections/WordSplitter.java @@ -32,7 +32,7 @@ public class WordSplitter extends BaseSplitter { } @NonNls - private static final Pattern SPECIAL = Pattern.compile("&\\p{Alnum}{4};?|#\\p{Alnum}{3,6}|0x\\p{Alnum}?"); + private static final Pattern SPECIAL = Pattern.compile("&\\p{Alnum}{2};?|#\\p{Alnum}{3,6}|0x\\p{Alnum}?"); @Override public void split(@Nullable String text, @NotNull TextRange range, Consumer consumer) { diff --git a/spellchecker/testSrc/com/intellij/spellchecker/inspector/SplitterTest.java b/spellchecker/testSrc/com/intellij/spellchecker/inspector/SplitterTest.java index 6f26abecf4ab..5e42e5abb0ec 100644 --- a/spellchecker/testSrc/com/intellij/spellchecker/inspector/SplitterTest.java +++ b/spellchecker/testSrc/com/intellij/spellchecker/inspector/SplitterTest.java @@ -227,7 +227,7 @@ public class SplitterTest { @Test public void testSpecial() { - String text = "test   test"; + String text = "test   test ⊃ >"; correctListToCheck(PlainTextSplitter.getInstance(), text, "test", "test"); }