🎨 优化to_markdown换行

This commit is contained in:
KimigaiiWuyi 2023-10-10 01:59:03 +08:00
parent d00a569c59
commit 617c900123

View File

@ -203,7 +203,8 @@ async def to_markdown(message: List[Message]) -> str:
elif m.type == 'image_size':
size = m.data
elif m.type == 'text':
_markdown_list.append(m.data)
assert isinstance(m.data, str)
_markdown_list.append(m.data.replace('\n', '\n\n'))
if url is not None and size is not None:
_markdown_list.append(f'![test #{size[0]}px #{size[1]}px]({url})')