Skip to content

Commit 5f35607

Browse files
added fix to woql pretty print
1 parent 853f484 commit 5f35607

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/woql.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,15 @@ WOQLQuery.prototype.prettyPrint = function(indent, show_context, q, embed){
286286
nvals.push(val[i]);
287287
}
288288
else {
289-
nvals.push('"'+val[i]+'"');
289+
if(typeof val[i] == "string"){
290+
nvals.push('"' + self.unclean(val[i]) + '"');
291+
}
292+
else if(typeof val[i] == "object"){
293+
nvals.push(JSON.stringify(val[i]));
294+
}
295+
else {
296+
nvals.push(val[i]);
297+
}
290298
}
291299
}
292300
if(nvals.length){

0 commit comments

Comments
 (0)