diff --git a/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java b/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java index b9e722331f31..ea8abbfc4a30 100644 --- a/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java +++ b/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java @@ -257,7 +257,11 @@ public class SpellCheckingInspection extends LocalInspectionTool { @Override public void consume(TextRange textRange) { - final String word = textRange.substring(myText); + String word = textRange.substring(myText); + int aposIndex = word.indexOf('\''); + if (aposIndex != -1) { + word = word.substring(0, aposIndex); // IdentifierSplitter.WORD leaves ' + } if (myHolder.isOnTheFly() && myAlreadyChecked.contains(word)) { return; } diff --git a/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java b/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java index 2b4d1c9cc593..ca6d032428e6 100644 --- a/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java +++ b/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java @@ -17,7 +17,7 @@ package testData.inspection.commentsWithMistakes.data.java.src; /* @author shkate@jetbrains.com -