From fb7f3f161481ce57609e88d0fee14c430a74aeff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=A8=E8=B6=8A=E6=99=A8=E6=98=8F?= <91008228+CrossDark@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:00:05 +0800 Subject: [PATCH] Update CrossDown.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改了段落 --- CrossDown.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CrossDown.py b/CrossDown.py index c471501..741c9f6 100644 --- a/CrossDown.py +++ b/CrossDown.py @@ -176,8 +176,8 @@ class CodeBlock: class Basic: @staticmethod def paragraph(text: str): - text = '\n'.join(['-' + line + '-' for line in original_string.splitlines()]) - return re.sub(r'(<.+?>.*?<.+?>)\n', r'

\1

\n', text) + text = '\n'.join([f'

{line}

' for line in original_string.splitlines()]) + return re.sub(r'

(<.+?>.*?<.+?>)

\n', r'\1\n', text) def add_indent_to_string(input_string: str, indent_spaces: int = 4):