[ES|QL] Removes highlighting from script as it is being provided by ES docs already (#215631)

## Summary

This PR https://github.com/elastic/elasticsearch/pull/125251 adds
highlighting for the code blocks so it is not needed to be added on the
kibana side. This PR removes it.

I didnt run the script because it will remove the highlighting. It will
run next Monday with @craigtaverner 's PR being merged
This commit is contained in:
Stratoula Kalafateli 2025-03-24 15:17:12 +01:00 committed by GitHub
parent a55e3253e7
commit 935fc0f758
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,10 +107,7 @@ function writeFunctionDocs(functionDocs: Map<string, DocsSectionContent>, pathTo
doc.description,
Array.from(functionDocs.keys())
);
const defaultMessage = replaceCodeBlocksForESQLFormatting(docWithoutLinks).replaceAll(
'`',
'\\`'
);
const defaultMessage = docWithoutLinks.replaceAll('`', '\\`');
return `
const foo =
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
@ -181,10 +178,6 @@ function removeAsciiDocInternalCrossReferences(asciidocString: string, functionN
});
}
function replaceCodeBlocksForESQLFormatting(text: string) {
return text.replace(/```(\n[\s\S]*?\n)```/g, '``` esql$1```');
}
/**
* This function searches the AST for the functions list
*/