Skip to content

Commit 0724061

Browse files
committed
preserve trailing whitespace when transforming CHANGELOG
1 parent fda1796 commit 0724061

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/update-release-branch.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
187187

188188
# until we find the first section, just duplicate all lines
189189
while True:
190-
line = f.readline().rstrip()
190+
line = f.readline()
191191

192-
output += line + '\n'
192+
output += line
193193
if line.startswith('## '):
194194
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
195195
# we have found the first section, so now handle things differently
@@ -202,7 +202,7 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
202202
line = f.readline()
203203
if not line:
204204
break # EOF
205-
line = line.rstrip()
205+
line = line.rstrip('\n')
206206

207207
# filter out changenote entries that apply only to newer versions
208208
match = some_versions_only_regex.search(line)

0 commit comments

Comments
 (0)