jreleaser icon indicating copy to clipboard operation
jreleaser copied to clipboard

[changelog] Indentation is not preserved for GitHub releases on Linux

Open crschnick opened this issue 1 year ago • 12 comments

I'm using a fixed changelog message template when releasing and announcing to GitHub and Discord. It looks for example like this:

🚀 {{projectName}} {{projectVersion}} has been released

If you have already installed {{projectName}} and have updates enabled,
this update will eventually be automatically installed when launching it the next time.

You can get the standalone version here: {{releaseNotesUrl}}

{{#rawChangelog}}
Changes in {{version}}
{{{rawChangelog}}}
{{/rawChangelog}}

where the raw changelog is supplied via the jreleaser environment, and it works fine. However, I noticed that when the raw changelog contains indents, e.g.

- Hello
  - World

the GitHub release body drops the indents, resulting in

- Hello
- World

This happens only when the tasks are run on Linux. When releasing on a Windows machine, the indents are preserved. I also tried to normalize the line endings to \n, but that doesn't help.

crschnick avatar Jan 04 '23 23:01 crschnick