diff --git a/.github/workflows/shell/gen_js_func_md.sh b/.github/workflows/shell/gen_js_func_md.sh index 5c3537ce5..214f7a18a 100644 --- a/.github/workflows/shell/gen_js_func_md.sh +++ b/.github/workflows/shell/gen_js_func_md.sh @@ -39,11 +39,18 @@ IFS=$'\n' if_file_list=($(find "${IF_DIR_PATH}" -type f | grep -v "/lib/")) IFS="${old_ifs}" exec_gen_md(){ + local newline="NEW_LINE" local src_path="${1}" awk \ -v src_path="${src_path}" \ - -v js_if_con="$(cat "${src_path}")" \ - -v class_name=$(basename "${src_path}" | sed 's/\..*$//') \ + -v js_if_con="$(\ + cat "${src_path}" \ + | sed 's/\\n/'${newline}'/g'\ + )" \ + -v class_name=$(\ + basename "${src_path}" \ + | sed 's/\..*$//'\ + ) \ -v classifi_func_dir_name=$(echo "${src_path}" \ | sed 's/'${IF_DIR_PATH//\//\\\/}'//g' \ | dirname "$(cat)" \