~comcloudway/builds.sr.ht

1af8b1724453cbf2e0fdcd440e7b49b85d83e12d — Simon Ser 5 years ago 078bc43
Fix line number links

The anchors no longer point to anything in the page.
1 files changed, 2 insertions(+), 1 deletions(-)

M buildsrht/blueprints/jobs.py
M buildsrht/blueprints/jobs.py => buildsrht/blueprints/jobs.py +2 -1
@@ 245,7 245,8 @@ def logify(text, task, log_url):
                + Markup('</pre>'))
        linenos = Markup('<pre>')
    for no in range(1, nlines + 1):
        linenos += Markup(f"<a href='#{escape(task)}-{no-1}'>{no}</a>")
        linenos += Markup(f'<a href="#{escape(task)}-{no-1}" '
                + f'id="#{escape(task)}-{no-1}">{no}</a>')
        if no != nlines:
            linenos += Markup("\n")
    linenos += Markup("</pre>")