Skip to content

Commit

Permalink
Workaround github markdown mess
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 30, 2023
1 parent 5ddd0ca commit 28576b0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion support/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,22 @@ def release(args):
# Update the date in the changelog.
changelog = 'ChangeLog.md'
changelog_path = os.path.join(fmt_repo.dir, changelog)
title_len = 0
first_section = True
code_block = False
changes = ''
for line in fileinput.input(changelog_path, inplace=True):
m = re.match(r'# (.*) - TBD', line)
if m:
version = m.group(1)
line = version + ' - ' + datetime.date.today().isoformat() + '\n'
elif line.startswith('#'):
first_section = False
elif first_section:
changes += line
if re.match(r'^\s*```', line):
code_block = not code_block
elif not code_block and line != '\n':
changes = changes.rstrip() + ' '
sys.stdout.write(line)

cmakelists = 'CMakeLists.txt'
Expand Down

0 comments on commit 28576b0

Please sign in to comment.