fix: preserve placeholder case when restoring project text
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user