fix: removed double linebreaks from formated text, plaintext
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Hazel 2024-05-15 14:26:19 +02:00
parent 98afe5047d
commit bab6aeb45d
2 changed files with 7 additions and 2 deletions

View File

@ -38,8 +38,13 @@ class FormattedText:
def markdown(self) -> str:
return md(self.html).strip()
@property
def plain(self) -> str:
md = self.markdown
return md.replace("\n\n", "\n")
def __str__(self) -> str:
return self.markdown
plaintext = markdown
plaintext = plain

View File

@ -34,6 +34,6 @@ class Lyrics(OuterProxy):
@property
def metadata(self) -> Metadata:
return Metadata({
id3Mapping.UNSYNCED_LYRICS: [self.text.markdown]
id3Mapping.UNSYNCED_LYRICS: [self.text.plaintext]
})