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.
This commit is contained in:
+2
-2
@@ -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, '<bubble type="$1" class="colors"><span is="bubble-heart"></span></bubble>');// « 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, '<bubble type="$1" class="colors"><span is="bubble-heart"></span></bubble>');// « 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];
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
Reference in New Issue
Block a user