Permalink
Browse files

feedwordpress-elements / XPath-like query test -- since we're followi…

…ng W3C XPath in starting the array of results at 1, not at 0, we may as well incorporate this into our listing of test results.
  • Loading branch information...
Rad Geek
Rad Geek committed Apr 20, 2016
1 parent 456ad81 commit 5715f70754da17c3a145624ad46af9c37cced54b
Showing with 1 addition and 1 deletion.
  1. +1 −1 feedwordpress-elements.js
@@ -629,7 +629,7 @@ function fwp_xpathtest_ok (response, result_id, destination) {
if (response.results instanceof Array) {
for (var i = 0; i < response.results.length; i++) {
- resultsHtml += '<li>result['+i.toString()+'] = <code>'+response.results[i]+'</code></li>';
+ resultsHtml += '<li>result['+(i+1).toString()+'] = <code>'+response.results[i]+'</code></li>';
}
} else {
resultsHtml += '<li>result = <code>' + response.results + '</code></li>';

0 comments on commit 5715f70

Please sign in to comment.