Rename node-nsspellchecker to node-spellchecker.

This commit is contained in:
Cheng Zhao
2013-03-27 12:24:10 +08:00
parent 7effc4c456
commit 4768ae9008
3 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{View} = require 'space-pen'
Range = require 'range'
CorrectionsView = require './corrections-view'
NSSpellChecker = require 'nsspellchecker'
SpellChecker = require 'spellchecker'
module.exports =
class MisspellingView extends View
@@ -31,7 +31,7 @@ class MisspellingView extends View
screenRange = @getScreenRange()
misspelling = @editor.getTextInRange(@editor.bufferRangeForScreenRange(screenRange))
corrections = NSSpellChecker.getCorrectionsForMisspelling(misspelling)
corrections = SpellChecker.getCorrectionsForMisspelling(misspelling)
@correctionsView?.remove()
@correctionsView = new CorrectionsView(@editor, corrections, screenRange)

View File

@@ -1,4 +1,4 @@
NSSpellChecker = require 'nsspellchecker'
SpellChecker = require 'spellchecker'
module.exports =
findMisspellings: (text) ->
@@ -8,7 +8,7 @@ module.exports =
for line in text.split('\n')
while matches = wordRegex.exec(line)
word = matches[1]
continue unless NSSpellChecker.isMisspelled(word)
continue unless SpellChecker.isMisspelled(word)
startColumn = matches.index + matches[0].length - word.length
endColumn = startColumn + word.length
misspellings.push([[row, startColumn], [row, endColumn]])