Fix formatting of release notes

This commit is contained in:
Victor Zverovich
2024-06-29 09:36:35 -07:00
parent dedc17c1c9
commit 84f6131825

View File

@ -166,7 +166,7 @@ def release(args):
first_section.pop(0) first_section.pop(0)
# Workaround GitHub-flavored markdown treating newlines as <br>. # Workaround GitHub-flavored markdown treating newlines as <br>.
changes = ''.join(first_section) changes = ''
code_block = False code_block = False
stripped = False stripped = False
for line in first_section: for line in first_section:
@ -179,10 +179,10 @@ def release(args):
changes += line changes += line
continue continue
if line == '\n' or re.match(r'^\s*\|.*', line): if line == '\n' or re.match(r'^\s*\|.*', line):
changes += line
if stripped: if stripped:
changes += line changes += '\n'
stripped = False stripped = False
changes += line
continue continue
if stripped: if stripped:
line = ' ' + line.lstrip() line = ' ' + line.lstrip()