Merge pull request #87 from Okabe-Rintarou-0/fix-markdown-display

正确显示多行输入的 markdown #84
This commit is contained in:
binary-husky 2023-03-29 19:32:19 +08:00 committed by GitHub
commit 6ca28fbff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,8 +107,8 @@ def text_divide_paragraph(text):
# wtf input
lines = text.split("\n")
for i, line in enumerate(lines):
if i!=0: lines[i] = "<p>"+lines[i].replace(" ", "&nbsp;")+"</p>"
text = "".join(lines)
lines[i] = "<p>"+lines[i].replace(" ", "&nbsp;")+"</p>"
text = "\n".join(lines)
return text
def markdown_convertion(txt):