Skip to content

Commit

Permalink
Don't escape _ in code blocks in the changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Aug 5, 2024
1 parent f3c020b commit 4ae6ceb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2432,9 +2432,11 @@ else
$changelog_url $changelog_previous
EOF
# ignore sed matching backticks
# shellcheck disable=SC2016
git -C "$topdir" log "$_changelog_range" --pretty=format:"###%B" \
| sed -e 's/^/ /g' -e 's/^ *$//g' -e 's/^ ###/- /g' -e 's/$/ /' \
-e 's/\([a-zA-Z0-9]\)_\([a-zA-Z0-9]\)/\1\\_\2/g' \
-e 's/`[^`]*`|\([a-zA-Z0-9]\)_\([a-zA-Z0-9]\)/\1\\_\2/g' \
-e 's/\[ci skip\]//g' -e 's/\[skip ci\]//g' \
-e '/git-svn-id:/d' -e '/^[[:space:]]*This reverts commit [0-9a-f]\{40\}\.[[:space:]]*$/d' \
-e '/^[[:space:]]*$/d' \
Expand Down Expand Up @@ -2474,11 +2476,13 @@ else
EOF
_svn_changelog=$( retry svn log "$topdir" "$_changelog_range" --xml )
# ignore sed matching backticks
# shellcheck disable=SC2016
echo "$_svn_changelog" \
| awk '/<msg>/,/<\/msg>/' \
| sed -e 's/<msg>/###/g' -e 's/<\/msg>//g' \
-e 's/^/ /g' -e 's/^ *$//g' -e 's/^ ###/- /g' -e 's/$/ /' \
-e 's/\([a-zA-Z0-9]\)_\([a-zA-Z0-9]\)/\1\\_\2/g' \
-e 's/`[^`]*`|\([a-zA-Z0-9]\)_\([a-zA-Z0-9]\)/\1\\_\2/g' \
-e 's/\[ci skip\]//g' -e 's/\[skip ci\]//g' \
-e '/^[[:space:]]*$/d' \
| line_ending_filter >> "$changelog_path"
Expand Down

0 comments on commit 4ae6ceb

Please sign in to comment.