Fixed adding ASCII art when posting from .gmi file.

This commit is contained in:
= 2022-06-02 22:50:21 +05:30
parent 29a9bd5056
commit 67c4b13b0a

View File

@ -227,6 +227,12 @@ def newpost(title, existing_content = None):
postHeader = ""
if modified: # add content to file using the existing_content list instead of opening editor
if (ch != 'n' or ch != 'N'):
with open(f"{wdir}blogpostHeader.gmi") as a: # loading post header
postHeader = a.readlines()
with open(f"{wdir+filename}.gmi", 'w') as o:
o.writelines(postHeader + existing_content)
else:
with open(f"{wdir+filename}.gmi", 'w') as o:
o.writelines(existing_content)
else: