Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bossinc committed Sep 28, 2023
1 parent 915a8d6 commit ba20bd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/data/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export function sqlToStatement(sql: string): Statement {
const re = /(\$__|\$|default|settings)/gi;
let regExpArray: RegExpExecArray | null;
while ((regExpArray = re.exec(sql)) !== null) {
let n = regExpArray[0];
replaceFuncs.push({ startIndex: regExpArray.index, name: n, replacementName: '' });
replaceFuncs.push({ startIndex: regExpArray.index, name: regExpArray[0], replacementName: '' });
}

//need to process in reverse so starting positions aren't effected by replacing other things
Expand Down

0 comments on commit ba20bd7

Please sign in to comment.