mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Handle quoted docs comment placeholders
This commit is contained in:
parent
4367dde6a9
commit
51636b14ae
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user