You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
341 B

# A sample on how a custom html generator might look
from formatitko.html_generator import HTMLGenerator
from panflute import Link
class KSPHTMLGenerator(HTMLGenerator):
def generate_Link(self, e: Link):
if e.url.startswith("ksp://"):
e.url = "https://ksp.mff.cuni.cz/viz/" + e.url[len("ksp://"):]
return super().generate_Link(e)