TEST EXEMPLE

titre en gros

titre en moins gros

titre en petit

Lien vers un site http externe

Lien vers un site gemini externe

Lien vers un media externe sur http

Lien vers un media mp3 local

Lien vers un media jpg local

Du code bien présenté

def extract_first_heading(filename, default=""):
    """
    Open a file which is presumed to contain text/gemini content and return
    the contents of the first heading line (regardless of heading level).
    If no heading lines are found, return the specified default.
    """
    with open(filename) as fp:
        for line in fp:
            if line.startswith("#"):
                while line[0] == "#":
                    line = line[1:]
                return line.strip()
    return default

Une citation

Hello World