Skip to content

Commit ece26fb

Browse files
committed
[ES|QL] Removes highlighting from script as it is being provided by ES docs already (elastic#215631)
## Summary This PR elastic/elasticsearch#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 (cherry picked from commit 935fc0f)
1 parent 41f753f commit ece26fb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/platform/packages/private/kbn-language-documentation/scripts/generate_esql_docs.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ function writeFunctionDocs(functionDocs: Map<string, DocsSectionContent>, pathTo
104104
doc.description,
105105
Array.from(functionDocs.keys())
106106
);
107-
const defaultMessage = replaceCodeBlocksForESQLFormatting(docWithoutLinks).replaceAll(
108-
'`',
109-
'\\`'
110-
);
107+
const defaultMessage = docWithoutLinks.replaceAll('`', '\\`');
111108
return `
112109
const foo =
113110
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
@@ -178,10 +175,6 @@ function removeAsciiDocInternalCrossReferences(asciidocString: string, functionN
178175
});
179176
}
180177

181-
function replaceCodeBlocksForESQLFormatting(text: string) {
182-
return text.replace(/```(\n[\s\S]*?\n)```/g, '``` esql$1```');
183-
}
184-
185178
/**
186179
* This function searches the AST for the functions list
187180
*/

0 commit comments

Comments
 (0)