Skip to content

Commit 5903934

Browse files
stratoulacqliu1
authored andcommitted
[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
1 parent 0b76e49 commit 5903934

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
@@ -107,10 +107,7 @@ function writeFunctionDocs(functionDocs: Map<string, DocsSectionContent>, pathTo
107107
doc.description,
108108
Array.from(functionDocs.keys())
109109
);
110-
const defaultMessage = replaceCodeBlocksForESQLFormatting(docWithoutLinks).replaceAll(
111-
'`',
112-
'\\`'
113-
);
110+
const defaultMessage = docWithoutLinks.replaceAll('`', '\\`');
114111
return `
115112
const foo =
116113
// Do not edit manually... automatically generated by scripts/generate_esql_docs.ts
@@ -181,10 +178,6 @@ function removeAsciiDocInternalCrossReferences(asciidocString: string, functionN
181178
});
182179
}
183180

184-
function replaceCodeBlocksForESQLFormatting(text: string) {
185-
return text.replace(/```(\n[\s\S]*?\n)```/g, '``` esql$1```');
186-
}
187-
188181
/**
189182
* This function searches the AST for the functions list
190183
*/

0 commit comments

Comments
 (0)