Update server.py

This commit is contained in:
Nova Cat 2025-01-13 15:28:42 -08:00
parent 3907c686d4
commit 1bdc1d523f

View file

@ -66,18 +66,18 @@ def relay():
if i.split(" ")[1] != "text/gemini":
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="https://swee.codes/style.css"><title>Something went wrong...</title></head><body><h1>Something went wrong...</h1><p>This path returned a file that isn\'t Gemtext, which Gem2Browser doesn\'t support downloading files.</p></body></html>'
else:
if i[0:1] == "# ":
if i[0:2] == "# ":
if title == "Something went wrong...":
title = i[2:]
temp = i[2:]
code += f"<h1>{temp}</h1>\n"
elif i[0:2] == "## ":
elif i[0:3] == "## ":
temp = i[3:]
code += f"<h2>{temp}</h2>\n"
elif i[0:3] == "### ":
elif i[0:4] == "### ":
temp = i[4:]
code += f"<h3>{temp}</h3>\n"
elif i[0:1] == "* ":
elif i[0:2] == "* ":
temp = i[2:]
code += f"<ul><li>{temp}</li></ul>"
else: