Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Release

on: workflow_dispatch
Expand Down Expand Up @@ -59,8 +58,8 @@ jobs:
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "Next\n----"
replace: "Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline\
\ }}"
replace: |-
Next\n----\n\n${{ steps.calver.outputs.release }}\n${{ steps.changelog_underline.outputs.underline }}\n
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block scalar doesn't interpret \n as newline characters

The change from double-quoted string to YAML block scalar (|-) syntax breaks the replacement. In double-quoted strings, \n is interpreted as a newline character. In literal block scalars, \n is kept as literal backslash-n text. The find pattern on line 60 still uses double-quoted syntax (actual newlines), but the replace content now contains literal \n characters instead of newlines. This will insert malformed text into CHANGELOG.rst instead of properly formatted lines.

Fix in Cursor Fix in Web

include: CHANGELOG.rst
regex: false

Expand Down