Commits

Anonymous committed 842432a

Fix searchtools JS.

Comments (0)

Files changed (1)

sphinx/static/searchtools.js

 
                 // prepare search
                 var filenames = data[0];
-                var titles = data[2]
-                    var words = data[3];
+                var titles = data[1]
+                var words = data[2];
                 var fileMap = {};
                 var files = null;
 
                 // areas and if the don't contain excluded words
                 var results = [];
                 for (var file in fileMap) {
+                    var valid = true;
 
                     // check if all requirements are matched
                     if (fileMap[file].length != searchwords.length) {
                         var listItem = $('<li style="display:none"></li>');
                         listItem.append($('<a/>').attr('href', item[0] + '.html' +
                                                        highlightstring).html(item[1]));
-                        $.get(item[0] + '.txt', function(data) {
+                        $.get('_sources/' + item[0] + '.txt', function(data) {
                                 listItem.append($.makeSearchSummary(data, searchwords, hlwords));
                                 output.append(listItem);
                                 listItem.slideDown(10, function() {