Skip to content

Commit

Permalink
Adding escape chars to search query
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyuk committed Jun 13, 2022
1 parent adce4f5 commit 069ccbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ function literalString(value) {

export function assignmentString(key, value) {
if (value === null) return "";
if (key === "query") {
value = JSON.stringify(value).slice(1, -1);
}
const displayValue = literalString(value);
return `\n${key} = ${displayValue}`;
}
Expand Down

0 comments on commit 069ccbb

Please sign in to comment.