gemtext renderer should be the default, not plaintextrenderer

This commit is contained in:
Ploum 2023-10-08 00:23:08 +02:00
parent 1baf311f2c
commit deaa199303
1 changed files with 4 additions and 0 deletions

View File

@ -1271,6 +1271,10 @@ def get_mime(path,url=None):
else:
#by default, we consider its gemini except for html
mime = "text/gemini"
#file doesnt recognise gemtext. It should be the default renderer.
#the only case were it doesnt make sense is if the file is .txt
if mime == "text/plain" and not path.endswith(".txt"):
mime = "text/gemini"
return mime
def renderer_from_file(path,url=None,theme=None):