Handle quoted docs comment placeholders

This commit is contained in:
Devin AI 2026-05-29 23:54:51 +00:00
parent 4367dde6a9
commit 51636b14ae

View File

@ -5,8 +5,8 @@ const placeholderPrefix = "#";
const replaceMePlaceholder = "REPLACE_ME";
function envOrUndefined(value: string | undefined): string | undefined {
const normalized = value?.trim();
if (normalized == null || normalized === "" || normalized.replace(/^["']|["']$/g, "") === replaceMePlaceholder || normalized.startsWith(placeholderPrefix)) {
const normalized = value?.trim().replace(/^["']|["']$/g, "");
if (normalized == null || normalized === "" || normalized === replaceMePlaceholder || normalized.startsWith(placeholderPrefix)) {
return undefined;
}
return normalized;