This is an automated email from the ASF dual-hosted git repository.

wanggenhua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a243a26a8 [Fix] Fix anchor jumping in documents. (#878)
1a243a26a8 is described below

commit 1a243a26a87fc472508f6b2775396269e1b2f582
Author: Amy0104 <[email protected]>
AuthorDate: Thu Jan 12 14:34:18 2023 +0800

    [Fix] Fix anchor jumping in documents. (#878)
---
 public/images/tasks/{data_quality.png => data-quality.png} | Bin
 public/images/tasks/{flink_stream.png => flink-stream.png} | Bin
 public/images/tasks/{sub_process.png => sub-process.png}   | Bin
 scripts/generate_docs.js                                   |   2 +-
 src/utils/formatName.js                                    |   2 +-
 5 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/images/tasks/data_quality.png 
b/public/images/tasks/data-quality.png
similarity index 100%
rename from public/images/tasks/data_quality.png
rename to public/images/tasks/data-quality.png
diff --git a/public/images/tasks/flink_stream.png 
b/public/images/tasks/flink-stream.png
similarity index 100%
rename from public/images/tasks/flink_stream.png
rename to public/images/tasks/flink-stream.png
diff --git a/public/images/tasks/sub_process.png 
b/public/images/tasks/sub-process.png
similarity index 100%
rename from public/images/tasks/sub_process.png
rename to public/images/tasks/sub-process.png
diff --git a/scripts/generate_docs.js b/scripts/generate_docs.js
index 1e4525f543..a3b8909c98 100644
--- a/scripts/generate_docs.js
+++ b/scripts/generate_docs.js
@@ -61,7 +61,7 @@ const parseStructure = (html, index, parent) => {
   }
 };
 
-const getAnchor = (name) => name.toLowerCase().replace(/\s/g, "_");
+const getAnchor = (name) => name.toLowerCase().replace(/\s/g, "-");
 
 const addAnchors = (html) => {
   let index = 1;
diff --git a/src/utils/formatName.js b/src/utils/formatName.js
index b86ba02ec3..f2d0c96235 100644
--- a/src/utils/formatName.js
+++ b/src/utils/formatName.js
@@ -1,4 +1,4 @@
 export const formatName = (name) => {
   if (!name || typeof name !== "string") return "";
-  return name.toLowerCase().replace(/\s/g, "_");
+  return name.toLowerCase().replace(/\s/g, "-");
 };

Reply via email to