From b51e02131c851237009d2e789d685e7f87e1ca3a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 23 Aug 2012 12:55:11 +0200 Subject: [PATCH] change regexp to avoid SOE on long words with underscores (PY-6604) --- .../src/com/intellij/spellchecker/inspections/TextSplitter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/TextSplitter.java b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/TextSplitter.java index ea7c75820e70..6327114829a9 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/TextSplitter.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/TextSplitter.java @@ -31,7 +31,7 @@ public class TextSplitter extends BaseSplitter { return INSTANCE; } - private static final Pattern EXTENDED_WORD_AND_SPECIAL = Pattern.compile("([&#]|0x[0-9]*)?\\p{L}+'?\\p{L}(_*\\p{L})*"); + private static final Pattern EXTENDED_WORD_AND_SPECIAL = Pattern.compile("([&#]|0x[0-9]*)?\\p{L}+'?\\p{L}[_\\p{L}]*"); @Override public void split(@Nullable String text, @NotNull TextRange range, Consumer consumer) {