--- a/src/Tools/jEdit/src/spell_checker.scala Sun Apr 13 19:20:03 2014 +0200
+++ b/src/Tools/jEdit/src/spell_checker.scala Sun Apr 13 19:32:49 2014 +0200
@@ -138,6 +138,9 @@
val result = new mutable.ListBuffer[Text.Range]
var offset = 0
+ def apostrophe(c: Int): Boolean =
+ c == '\'' && (offset + 1 == text.length || text(offset + 1) != '\'')
+
@tailrec def scan(pred: Int => Boolean)
{
if (offset < text.length) {
@@ -152,7 +155,7 @@
while (offset < text.length) {
scan(c => !Character.isLetter(c))
val start = offset
- scan(c => Character.isLetterOrDigit(c) || c == '\'')
+ scan(c => Character.isLetterOrDigit(c) || apostrophe(c))
val stop = offset
if (stop - start >= 2 && !check(text.substring(start, stop)))
result += Text.Range(start, stop)