Skip to content

Commit

Permalink
fix: replace bash pattern replacement with sed (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
apteryxxyz authored Oct 15, 2024
1 parent f1cd179 commit 7797395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/copy-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ process_subpackage() {
local title="$(kebab_to_title_case "$pkg_name")"
fi

escaped_name="${name//@/\\@}"
escaped_name="${escaped_name//\//\\/}"
escaped_name=$(echo "$name" | sed 's/@/\\@/g')
escaped_name=$(echo "$escaped_name" | sed 's/\//\\/g')
sed -i -e "s/title: \(.*\)/title: \"$escaped_name\"/" "$dir/index.mdx"
sed -i -e "s/## Index/ /" "$dir/index.mdx"
echo "{ \"title\": \"$title\" }" >"$dir/meta.json"
Expand Down

0 comments on commit 7797395

Please sign in to comment.