There was an error while loading. Please reload this page.
1 parent 24be7cd commit 5620d5bCopy full SHA for 5620d5b
1 file changed
src/patches/sessionColor.ts
@@ -42,14 +42,15 @@ export const writeSessionColor = (oldFile: string): string | null => {
42
const match = result.match(pattern);
43
if (!match || match.index === undefined) continue;
44
45
+ const prePatch = result;
46
const replacement = INJECTION + match[0];
47
result =
- result.slice(0, match.index) +
48
+ prePatch.slice(0, match.index) +
49
replacement +
- result.slice(match.index + match[0].length);
50
+ prePatch.slice(match.index + match[0].length);
51
52
showDiff(
- oldFile,
53
+ prePatch,
54
result,
55
replacement,
56
match.index,
0 commit comments