docs(auto-reply): align silent token comment with regex

This commit is contained in:
Ayaan Zaidi
2026-02-26 15:59:53 +05:30
committed by Ayaan Zaidi
parent e64d72299e
commit 133f14c0af

View File

@@ -11,8 +11,8 @@ export function isSilentReplyText(
return false;
}
const escaped = escapeRegExp(token);
// Only match when the entire response (trimmed) is the silent token,
// optionally surrounded by whitespace. This prevents
// Match only the exact silent token with optional surrounding whitespace.
// This prevents
// substantive replies ending with NO_REPLY from being suppressed (#19537).
return new RegExp(`^\\s*${escaped}\\s*$`).test(text);
}