mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-09 21:00:06 +00:00
Workaround github markdown mess
This commit is contained in:
parent
5ddd0cad15
commit
28576b0600
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user