Author: szabyg
Date: Tue Apr 30 12:41:39 2013
New Revision: 1477595

URL: http://svn.apache.org/r1477595
Log:
Minor bugfix for STANBOL-981

Modified:
    
stanbol/trunk/demos/webvie/src/main/resources/META-INF/resources/static/enhancervie/lib/annotate.js

Modified: 
stanbol/trunk/demos/webvie/src/main/resources/META-INF/resources/static/enhancervie/lib/annotate.js
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/demos/webvie/src/main/resources/META-INF/resources/static/enhancervie/lib/annotate.js?rev=1477595&r1=1477594&r2=1477595&view=diff
==============================================================================
--- 
stanbol/trunk/demos/webvie/src/main/resources/META-INF/resources/static/enhancervie/lib/annotate.js
 (original)
+++ 
stanbol/trunk/demos/webvie/src/main/resources/META-INF/resources/static/enhancervie/lib/annotate.js
 Tue Apr 30 12:41:39 2013
@@ -482,16 +482,15 @@
         options = {};
       }
       occurrences = function(str, s) {
-        var last, next, res, _results;
+        var last, next, res;
         res = [];
         last = 0;
-        _results = [];
-        while (str.indexOf(s, last + 1) !== -1) {
-          next = str.indexOf(s, last + 1);
+        while (str.indexOf(s, last) !== -1) {
+          next = str.indexOf(s, last);
           res.push(next);
-          _results.push(last = next);
+          last = next + 1;
         }
-        return _results;
+        return res;
       };
       nearest = function(arr, nr) {
         return _(arr).sortedIndex(nr);


Reply via email to