entry with multiple -b options no longer add sub bullet points

This commit is contained in:
2021-04-30 21:51:04 -07:00
parent 7c638ad5fe
commit 000228a836
2 changed files with 6 additions and 17 deletions

View File

@ -154,26 +154,11 @@ def entry(obj: Changelog, bullets, paragraphs, section_name, version_name):
except KeyError as k:
raise click.BadArgumentUsage(k)
if section_name not in version.sections.keys():
version.sections[section_name] = []
for p in paragraphs:
version.add_entry(p, section_name)
sub_bullet = False
bullet_str = ''
for bullet in bullets:
bullet = bullet.strip()
if bullet[0] not in ['-+*']:
bullet = '- ' + bullet
if sub_bullet:
bullet = '\n ' + bullet
bullet_str += bullet
sub_bullet = True
version.add_entry(bullet_str, section_name)
for b in bullets:
version.add_entry('- ' + b, section_name)
obj.write()