ispell 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/ispell.rb +4 -4
- metadata +1 -1
data/History.txt
CHANGED
data/lib/ispell.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Ispell
|
2
|
-
VERSION = '0.1.
|
2
|
+
VERSION = '0.1.1'
|
3
3
|
|
4
4
|
class Result
|
5
5
|
TYPES = { '*' => :ok, '+' => :root, '&' => :miss,
|
@@ -48,11 +48,11 @@ class Ispell
|
|
48
48
|
|
49
49
|
# Spell check the provided line, returns an +Array+ of +Ispell::Result+
|
50
50
|
def spellcheck(line)
|
51
|
-
line.gsub!(/\r
|
52
|
-
line.gsub!(/\s
|
51
|
+
line.gsub!(/\r/n,'')
|
52
|
+
line.gsub!(/\s+/n, ' ')
|
53
53
|
results = to_ispell(line)
|
54
54
|
results.collect do |line|
|
55
|
-
tokens = line.split(/,?:?\s+/)
|
55
|
+
tokens = line.split(/,?:?\s+/n)
|
56
56
|
res = Result.new
|
57
57
|
res.type = Result::TYPES[tokens.shift]
|
58
58
|
case res.type
|