Fixed adding ASCII art when posting from .gmi file.
This commit is contained in:
parent
29a9bd5056
commit
67c4b13b0a
10
gempost
10
gempost
|
@ -227,8 +227,14 @@ def newpost(title, existing_content = None):
|
|||
postHeader = ""
|
||||
|
||||
if modified: # add content to file using the existing_content list instead of opening editor
|
||||
with open(f"{wdir+filename}.gmi", 'w') as o:
|
||||
o.writelines(existing_content)
|
||||
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:
|
||||
temp = "# " + title
|
||||
exec(f'echo "{temp}" | cat >> {wdir + filename}.gmi') # adding title to empty file
|
||||
|
|
Loading…
Reference in New Issue