mirror of https://github.com/apache/druid.git
Fix TRIM help broken in Console SQL Editor (#11628)
* delete escape * bug fix Co-authored-by: yuanyi <yuanyi@freewheel.tv>
This commit is contained in:
parent
ec6c6e2d53
commit
ca5e55cc8c
|
@ -30,6 +30,10 @@ function unwrapMarkdownLinks(str) {
|
|||
return str.replace(/\[([^\]]+)\]\([^)]+\)/g, (_, s) => s);
|
||||
}
|
||||
|
||||
function deleteBackticks(str) {
|
||||
return str.replace(/`/g, "");
|
||||
}
|
||||
|
||||
const readDoc = async () => {
|
||||
const data = await fs.readFile(readfile, 'utf-8');
|
||||
const lines = data.split('\n');
|
||||
|
@ -41,8 +45,8 @@ const readDoc = async () => {
|
|||
if (functionMatch) {
|
||||
functionDocs.push([
|
||||
functionMatch[1],
|
||||
functionMatch[2],
|
||||
unwrapMarkdownLinks(functionMatch[3]),
|
||||
deleteBackticks(functionMatch[2]),
|
||||
deleteBackticks(unwrapMarkdownLinks(functionMatch[3])),
|
||||
// functionMatch[4] would be the default column but we ignore it for now
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ export class QueryInput extends React.PureComponent<QueryInputProps, QueryInputS
|
|||
static makeDocHtml(item: any) {
|
||||
return `
|
||||
<div class="doc-name">${escape(item.caption)}</div>
|
||||
<div class="doc-syntax">${escape(item.syntax)}</div>
|
||||
<div class="doc-syntax">${item.syntax}</div>
|
||||
<div class="doc-description">${escape(item.description)}</div>`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue