You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by yu...@apache.org on 2021/08/30 05:05:01 UTC
[druid] branch master updated: Fix TRIM help broken in Console SQL
Editor (#11628)
This is an automated email from the ASF dual-hosted git repository.
yuanyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new ca5e55c Fix TRIM help broken in Console SQL Editor (#11628)
ca5e55c is described below
commit ca5e55cc8ca558ab6ced785f0b8cdced2094a508
Author: Yi Yuan <26...@qq.com>
AuthorDate: Mon Aug 30 13:04:35 2021 +0800
Fix TRIM help broken in Console SQL Editor (#11628)
* delete escape
* bug fix
Co-authored-by: yuanyi <yu...@freewheel.tv>
---
web-console/script/create-sql-docs.js | 8 ++++++--
web-console/src/views/query-view/query-input/query-input.tsx | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/web-console/script/create-sql-docs.js b/web-console/script/create-sql-docs.js
index 3e56864..71ac809 100755
--- a/web-console/script/create-sql-docs.js
+++ b/web-console/script/create-sql-docs.js
@@ -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
]);
}
diff --git a/web-console/src/views/query-view/query-input/query-input.tsx b/web-console/src/views/query-view/query-input/query-input.tsx
index 5753293..a2ceb2d 100644
--- a/web-console/src/views/query-view/query-input/query-input.tsx
+++ b/web-console/src/views/query-view/query-input/query-input.tsx
@@ -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>`;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org