Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

offset and confidence are now parsed to ints

  • Loading branch information...
commit 78d6353397a07076dd4947c1d9acd75ceb162af9 1 parent c2c4940
@tstone authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/result.js
View
7 src/result.js
@@ -27,10 +27,10 @@ var Result = function(base, source, config) { this.__init(base, source, config);
var sugObj = function(o) {
var sug = {
- offset: o.attrs.o,
- confidence: o.attrs.s,
+ offset: parseInt(o.attrs.o, 10),
+ confidence: parseInt(o.attrs.s, 10),
word: this.source.substr(o.attrs.o - 1, o.attrs.l),
- words: o.chars.split('\t'),
+ words: o.chars.split('\t')
};
sug.context = lib.getContext(source, sug.word, sug.offset, 50, 30);
return sug;
@@ -44,6 +44,7 @@ var Result = function(base, source, config) { this.__init(base, source, config);
Array.isArray(xs) ? xs.forEach(addSug) : addSug(xs);
this.suggestions = suggestions;
+ console.log(suggestions);
};
Please sign in to comment.
Something went wrong with that request. Please try again.