Fix links originating from top-level of graph center.

This commit is contained in:
Sergio Martínez Portela 2023-06-19 00:07:40 +02:00
parent 539240079f
commit d6c8b9f3db

View File

@ -9,15 +9,20 @@ import os
def gen(headline_id, graph):
reference_node = headline_id
linked_from_internal = set()
g = copy.deepcopy(graph)
centered_graph = { reference_node: g[reference_node] }
for l in g[reference_node]['links']:
lt = l['target']
if lt.startswith("id:"):
lt = lt[3:]
linked_from_internal.add(lt)
del g[reference_node]
new_nodes = True
in_emacs_tree = {
reference_node: set(),
}
linked_from_internal = set()
while new_nodes:
new_nodes = False