Skip to content

Commit 587243e

Browse files
committed
notes
1 parent fac64e9 commit 587243e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/deparser/src/deparser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,10 @@ export class Deparser implements DeparserVisitor {
976976

977977
const boolContext = { ...context, bool: true };
978978

979+
// explanation of our syntax/fix below:
980+
// return formatStr.replace('%s', andArgs); // ❌ Interprets $ as special syntax
981+
// return formatStr.replace('%s', () => andArgs); // ✅ Function callback prevents interpretation
982+
979983
switch (boolop) {
980984
case 'AND_EXPR':
981985
const andArgs = args.map(arg => this.visit(arg, boolContext)).join(' AND ');

0 commit comments

Comments
 (0)