Skip to content

Commit

Permalink
Add characters to be replaced in toVar (#197)
Browse files Browse the repository at this point in the history
* add ~ and ` to be replaced when creating variables in compileDatalog

* 1.21.2
  • Loading branch information
mdroidian authored Dec 14, 2023
1 parent 60e1649 commit 93a61c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "query-builder",
"version": "1.21.1",
"version": "1.21.2",
"description": "Introduces new user interfaces for building queries in Roam",
"main": "./build/main.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/compileDatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {

const indent = (n: number) => "".padStart(n * 2, " ");

const toVar = (v = "undefined") => v.replace(/[\s"()[\]{}/\\^@,]/g, "");
const toVar = (v = "undefined") => v.replace(/[\s"()[\]{}/\\^@,~`]/g, "");

const compileDatalog = (
d: DatalogClause | DatalogArgument | DatalogBinding,
Expand Down

0 comments on commit 93a61c0

Please sign in to comment.