Permalink
Browse files

Dictionary files now ignore whitespace around words

  • Loading branch information...
1 parent dcd5544 commit 51df64e2e2da3e44e21cd14ae28ac10a09fad623 @tstone committed Jun 24, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 package.json
  2. +1 −1 src/checker.js
View
@@ -1,6 +1,6 @@
{
"name": "googlespell",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "A node module for the undocumented google spell API",
"homepage": "http://github.com/tstone/googlespell",
"keywords": [ "spell check", "spell", "google" ],
View
@@ -22,7 +22,7 @@ var Checker = function(config){
if (Array.isArray(config.dictionary)) {
this.config.dictionary = config.dictionary;
} else {
- this.config.dictionary = fs.readFileSync(config.dictionary, 'utf8').split('\n');
+ this.config.dictionary = fs.readFileSync(config.dictionary, 'utf8').split('\n').map(function(x) { return x.trim(); });
}
} else {
this.config.dictionary = [];

0 comments on commit 51df64e

Please sign in to comment.