From 8bb68bf9384c8e2dfe5ac157d9ea482cc368ee8a Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 6 Nov 2025 17:30:40 -0600 Subject: [PATCH] Website: remove datatype bubble replacement in Markdown documentation (#35316) Closes: https://github.com/fleetdm/fleet/issues/34935 Changes: - Commented out the regex replace that replaces words in double parentheses with data type spans. --- website/scripts/build-static-content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index 6beb97fe11..314fd5d558 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -397,7 +397,6 @@ module.exports = { // Compile markdown to HTML. // > This includes build-time enablement of: // > • syntax highlighting - // > • data type bubbles // > • transforming relative markdown links to their fleetdm.com equivalents // > // > For more info about how these additional features work, see: https://github.com/fleetdm/fleet/issues/706#issuecomment-884622252 @@ -426,7 +425,8 @@ module.exports = { if(htmlString.match(/(`){3,4}[\s\S]+(`){3}/g)){ throw new Error('The compiled markdown has a codeblock (\`\`\`) nested inside of another codeblock (\`\`\`\`) at '+pageSourcePath+'. To resolve this error, remove the codeblock nested inside another codeblock from this file.'); } - htmlString = htmlString.replace(/\(\(([^())]*)\)\)/g, '');// « Replace ((bubble))s with HTML. For more background, see https://github.com/fleetdm/fleet/issues/706#issuecomment-884622252 + // (2025-11-06) eashaw: I'm commenting the line below out to resolve a bug where the regex below would replace content inside of a code block. See https://github.com/fleetdm/fleet/issues/34935 for more details. + // htmlString = htmlString.replace(/\(\(([^())]*)\)\)/g, '');// « Replace ((bubble))s with HTML. For more background, see https://github.com/fleetdm/fleet/issues/706#issuecomment-884622252 htmlString = htmlString.replace(/(href="(\.\/[^"]+|\.\.\/[^"]+)")/g, (hrefString)=>{// « Modify path-relative links like `./…` and `../…` to make them absolute. (See https://github.com/fleetdm/fleet/issues/706#issuecomment-884641081 for more background) let oldRelPath = hrefString.match(/href="(\.\/[^"]+|\.\.\/[^"]+)"/)[1]; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -