gpt-engineer-app[bot] commited on
Commit
be3f641
·
1 Parent(s): 861b88c
src/server/branch-debug.functions.ts CHANGED
@@ -50,7 +50,7 @@ const RESERVED = new Set([
50
  "diff","git","index","main","feature","a","b","fix","add","remove","update",
51
  ]);
52
 
53
- function sanitize(diff: string) {
54
  const tokenMap = new Map<string, string>(); // real -> token
55
  const reverseMap = new Map<string, string>(); // token -> real
56
  const occurrences = new Map<string, number>(); // real -> count
@@ -131,7 +131,7 @@ function sanitize(diff: string) {
131
  };
132
  }
133
 
134
- function restore(text: string, reverseMap: Map<string, string>): string {
135
  return text.replace(/fn_\d{4}/g, (tok) => reverseMap.get(tok) ?? tok);
136
  }
137
 
 
50
  "diff","git","index","main","feature","a","b","fix","add","remove","update",
51
  ]);
52
 
53
+ export function sanitize(diff: string) {
54
  const tokenMap = new Map<string, string>(); // real -> token
55
  const reverseMap = new Map<string, string>(); // token -> real
56
  const occurrences = new Map<string, number>(); // real -> count
 
131
  };
132
  }
133
 
134
+ export function restore(text: string, reverseMap: Map<string, string>): string {
135
  return text.replace(/fn_\d{4}/g, (tok) => reverseMap.get(tok) ?? tok);
136
  }
137