fix printing strings
authorAnotherTest <ali.mpfard@gmail.com>
Fri, 10 Jan 2020 01:12:39 +0000 (04:42 +0330)
committerAnotherTest <ali.mpfard@gmail.com>
Fri, 10 Jan 2020 01:12:39 +0000 (04:42 +0330)
jq/printer.jq

index 88f6cad..c4ce3d9 100644 (file)
@@ -8,7 +8,7 @@ def _reconstruct_hash:
 
 def pr_str(opt):
     (select(.kind == "symbol")  | .value) //
-    (select(.kind == "string")  | .value | if opt.readable then tojson else . end) //
+    (select(.kind == "string")  | .value | if opt.readable then tojson|tojson else tojson end) //
     (select(.kind == "keyword") | ":\(.value)")  //
     (select(.kind == "number")  | .value | tostring) //
     (select(.kind == "list")    | .value | map(pr_str(opt))  | join(" ") | "(\(.))") //