Update CrossDown.py

更新了段落处理
This commit is contained in:
跨越晨昏 2024-08-29 17:36:08 +08:00 committed by GitHub
parent 811b2f451a
commit e5cae2491f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,6 +176,7 @@ class CodeBlock:
class Basic: class Basic:
@staticmethod @staticmethod
def paragraph(text: str): def paragraph(text: str):
text = '\n'.join(['-' + line + '-' for line in original_string.splitlines()])
return re.sub(r'(<.+?>.*?<.+?>)\n', r'<p>\1</p>\n', text) return re.sub(r'(<.+?>.*?<.+?>)\n', r'<p>\1</p>\n', text)