Remove redundant whitespace on end of line (for an even weird edge case)
This commit is contained in:
parent
d83f8cc7fc
commit
34988440fd
|
@ -15,10 +15,11 @@ def format_message_as_citation(out: list[str], msg: Message) -> None:
|
|||
out.append(f'{msg.sent_at.date()} {msg.sent_at.time()} [[{msg.sender}]]:')
|
||||
out.append('\n')
|
||||
for line in msg.text.strip().split('\n'):
|
||||
normalized = normalize_line(line)
|
||||
out.append('>')
|
||||
if line:
|
||||
if normalized:
|
||||
out.append(' ')
|
||||
out.append(normalize_line(line))
|
||||
out.append(normalized)
|
||||
out.append('\n')
|
||||
del line
|
||||
out.append('\n')
|
||||
|
|
|
@ -6,7 +6,7 @@ from libpurple_to_markdown.markdown import format_messages
|
|||
NOW = datetime.datetime.fromtimestamp(1_000_000_000, tz=datetime.UTC)
|
||||
|
||||
|
||||
TEXT_1 = 'Hello \n\nWorld \n '
|
||||
TEXT_1 = 'Hello \n \nWorld \n '
|
||||
|
||||
EXPECTED_1 = """# Test
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user