From 617c900123193582545c22a03fa1d1ca337a621f Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Tue, 10 Oct 2023 01:59:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96`to=5Fmarkdown?= =?UTF-8?q?`=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gsuid_core/segment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gsuid_core/segment.py b/gsuid_core/segment.py index 695812d..b750826 100644 --- a/gsuid_core/segment.py +++ b/gsuid_core/segment.py @@ -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})')