fix: preserve placeholder case when restoring project text

This commit is contained in:
muena
2026-10-06 13:43:33 +02:00
parent 7db3949d66
commit 818f9ed814
5 changed files with 54 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ import { environment } from "@raycast/api";
import type { EntityType, PlaceholderMapping } from "../types";
import { whitelistKey } from "./project-whitelist";
import type { ProjectWhitelistEntry } from "./project-whitelist";
import { restoreOriginalCase } from "./restore-case";
export { whitelistKey } from "./project-whitelist";
export type { ProjectWhitelistEntry } from "./project-whitelist";
@@ -265,7 +266,7 @@ function restorePattern(mapping: PlaceholderMapping, matchModes: ProjectRun["mat
originalFor: (match) => {
const key = Object.prototype.hasOwnProperty.call(mapping, match)
? match : foldedKeys.get(match.toUpperCase());
return key ? mapping[key].original : undefined;
return key ? restoreOriginalCase(match, key, mapping[key].original) : undefined;
},
};
}