Website: Update @fleetdm.com email check in build-static-content script (#41348)

Changes:
- Updated the `@fleetdm.com` email address check in the
build-static-content to exclude support@
This commit is contained in:
Eric 2026-03-10 10:49:42 -05:00 committed by GitHub
parent 3f93296c62
commit fc5f249fd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -407,7 +407,7 @@ module.exports = {
let mdString = await sails.helpers.fs.read(pageSourcePath);
// Look for non example @fleetdm.com email addresses in the Markdown string, if any are found, throw an error.
if(mdString.match(/[A-Z0-9._%+-]+@fleetdm\.com/gi)) {
if(mdString.match(/\b(?!support@fleetdm\.com\b)[A-Z0-9._%+-]+@fleetdm\.com\b/gi)) {
throw new Error(`A Markdown file (${pageSourcePath}) contains a @fleetdm.com email address. To resolve this error, remove the email address in that file or change it to be an @example.com email address and try running this script again.`);
}
// Look for multi-line HTML comments starting after lists without a blank newline. (The opening comment block is parsed as part of the list item preceeding it, and the closing block will be parsed as a paragraph)