mirror of
https://github.com/drewcassidy/yaclog.git
synced 2024-09-01 14:58:58 +00:00
better version header formatting
This commit is contained in:
parent
1b263ad38f
commit
b5c4a1757e
@ -45,15 +45,14 @@ class VersionEntry:
|
|||||||
self.link: str = ''
|
self.link: str = ''
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
if self.name.lower() == 'unreleased':
|
segments = ['##', self.name]
|
||||||
return f'## {self.name}'
|
|
||||||
|
|
||||||
date_str = self.date.isoformat() if self.date else 'UNKNOWN'
|
if self.date:
|
||||||
line = f'## {self.name} - {date_str}'
|
segments += ['-', self.date.isoformat()]
|
||||||
for tag in self.tags:
|
|
||||||
line += ' [' + tag.upper() + ']'
|
|
||||||
|
|
||||||
return line
|
segments += [f'[{t.upper()}]' for t in self.tags]
|
||||||
|
|
||||||
|
return ' '.join(segments)
|
||||||
|
|
||||||
|
|
||||||
class Changelog:
|
class Changelog:
|
||||||
|
Loading…
Reference in New Issue
Block a user