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

dev
Andrew Cassidy 3 years ago
parent 7c638ad5fe
commit 000228a836

@ -11,6 +11,10 @@ All notable changes to this project will be documented in this file
- can now handle other text surrounding a pep440-compliant version number, which will not be modified
- can now handle pre-releases correctly. The version to increment is the most recent version in the log with a valid pep440 version number in it. Release increment and prerelease increments can be mixed, allowing e.g: `yaclog release -mr` to create a release candidate with in incremented minor version number.
### Removed
- `entry` with multiple `-b` options no longer add sub bullet points, instead adding each bullet as its own line.
## 0.3.3 - 2021-04-27
### Added

@ -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()

Loading…
Cancel
Save