Convert the linked-from list into a tagged list.

This commit is contained in:
Sergio Martínez Portela 2022-11-22 20:28:14 +01:00
parent 86e36d5b79
commit 88029a27d0
2 changed files with 3 additions and 3 deletions

View File

@ -626,12 +626,12 @@ def render_connections(headline_id, content, graph):
if headline_id not in graph['backlinks']: if headline_id not in graph['backlinks']:
return return
content.append("<div class='connections'><span class='backlink-explanation'>These notes link here:</span><ul>") content.append("<ul><li class='connections'><span class='tag backlink-explanation'>Linked from</span><ul>")
for backlink in sorted(graph['backlinks'][headline_id], key=lambda x: graph['nodes'][x]['title']): for backlink in sorted(graph['backlinks'][headline_id], key=lambda x: graph['nodes'][x]['title']):
link = graph["nodes"][backlink] link = graph["nodes"][backlink]
title = link["title"] title = link["title"]
content.append(f"<li><a class='internal backlink' href='./{backlink}.node.html'>{html.escape(title)}</a></li>") content.append(f"<li><a class='internal backlink' href='./{backlink}.node.html'>{html.escape(title)}</a></li>")
content.append("</ul></div>") content.append("</ul></ul></div>")
def render(headline, doc, graph, headlineLevel): def render(headline, doc, graph, headlineLevel):
try: try: