Skip to content

Commit

Permalink
[#1238] Add normalizations to merge Changelog task
Browse files Browse the repository at this point in the history
  • Loading branch information
fivitti committed Dec 4, 2023
1 parent 1543dba commit 79aa309
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rakelib/70_release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ namespace :release do
# Read the file content.
entry_content = File.read(entry_file)

# Strip the leading asterisk from the beginning of the file.
entry_content.sub!(/^\s*\*/, '')

# Normalize the indentation to 4 spaces. Preserve the empty lines.
entry_content.gsub!(/^[ \t]*([^ \t])/, ' \1')
entry_content.gsub!(/^ $/, '')

# Strip the whitespace from the beginning and the end of the file.
entry_content.strip!

Expand Down

0 comments on commit 79aa309

Please sign in to comment.