mirror of
https://github.com/drewcassidy/yaclog.git
synced 2024-09-01 14:58:58 +00:00
entry
with multiple -b
options no longer add sub bullet points
This commit is contained in:
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 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.
|
- 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
|
## 0.3.3 - 2021-04-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -154,26 +154,11 @@ def entry(obj: Changelog, bullets, paragraphs, section_name, version_name):
|
|||||||
except KeyError as k:
|
except KeyError as k:
|
||||||
raise click.BadArgumentUsage(k)
|
raise click.BadArgumentUsage(k)
|
||||||
|
|
||||||
if section_name not in version.sections.keys():
|
|
||||||
version.sections[section_name] = []
|
|
||||||
|
|
||||||
for p in paragraphs:
|
for p in paragraphs:
|
||||||
version.add_entry(p, section_name)
|
version.add_entry(p, section_name)
|
||||||
|
|
||||||
sub_bullet = False
|
for b in bullets:
|
||||||
bullet_str = ''
|
version.add_entry('- ' + b, section_name)
|
||||||
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)
|
|
||||||
|
|
||||||
obj.write()
|
obj.write()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user