mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-30 21:35:55 +00:00
Fix formatting
This commit is contained in:
parent
949d5d1795
commit
26d07e49b2
@ -165,28 +165,7 @@ def release(args):
|
|||||||
if first_section[0] == '\n':
|
if first_section[0] == '\n':
|
||||||
first_section.pop(0)
|
first_section.pop(0)
|
||||||
|
|
||||||
changes = ''
|
changes = first_section
|
||||||
code_block = False
|
|
||||||
stripped = False
|
|
||||||
for line in first_section:
|
|
||||||
if re.match(r'^\s*```', line):
|
|
||||||
code_block = not code_block
|
|
||||||
changes += line
|
|
||||||
stripped = False
|
|
||||||
continue
|
|
||||||
if code_block:
|
|
||||||
changes += line
|
|
||||||
continue
|
|
||||||
if line == '\n':
|
|
||||||
changes += line
|
|
||||||
if stripped:
|
|
||||||
changes += line
|
|
||||||
stripped = False
|
|
||||||
continue
|
|
||||||
if stripped:
|
|
||||||
line = ' ' + line.lstrip()
|
|
||||||
changes += line.rstrip()
|
|
||||||
stripped = True
|
|
||||||
|
|
||||||
fmt_repo.checkout('-B', 'release')
|
fmt_repo.checkout('-B', 'release')
|
||||||
fmt_repo.add(changelog)
|
fmt_repo.add(changelog)
|
||||||
|
Loading…
Reference in New Issue
Block a user