Skip to content

Commit

Permalink
use json notation instead of dumb strings
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed May 9, 2012
1 parent 69edbef commit 91f5188
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/DAV/plugins/codesearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ jsDAV_Codesearch_Plugin.MAXSIZE = 68157440; // 65MB
optionsDesc = "";
}

return options.query+ ":" + options.replacement + ":" + optionsDesc + "\n" + count + ":" + filecount + "\n\n" + result;
if (options.replacement === undefined || options.replacement.length == 0)
options.replacement = "";

return '{"query":"' + options.query + '", "replacement":"' + options.replacement + '", "optionsDesc": "' + optionsDesc + '"}'
+ '\n' + '{"count":' + count + ', "filecount":' + filecount + '}\n\n' + result;
};
}).call(jsDAV_Codesearch_Plugin.prototype = new jsDAV_ServerPlugin());

Expand Down

0 comments on commit 91f5188

Please sign in to comment.