From 088176d4c3efb3d9a90e15901793ffdb0e4784a5 Mon Sep 17 00:00:00 2001 From: SkepticMystic Date: Sun, 5 May 2024 11:16:59 +0200 Subject: [PATCH] fix(view:codeblock:markmap): depth + 1, wikilinks, extra \n --- src/utils/markmap.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/markmap.ts b/src/utils/markmap.ts index 4c07b15a..65a37650 100644 --- a/src/utils/markmap.ts +++ b/src/utils/markmap.ts @@ -15,19 +15,19 @@ const from_tree = (tree: EdgeTree[], options?: Options) => { let markmap = ""; tree.forEach((item) => { - const hashes = "#".repeat(item.depth); + const hashes = "#".repeat(item.depth + 1); const link = Links.ify( item.edge.target_id, Paths.show(item.edge.target_id, options?.show_node_options), - { link_kind: "markdown" }, + { link_kind: "wiki" }, ); const attr = options?.show_attributes ? ` (${url_search_params(untyped_pick(item.edge.attr, options.show_attributes), { trim_lone_param: true })})` : ""; - markmap += `${hashes} ${link}${attr}\n`; + markmap += `${hashes} ${link}${attr}\n\n`; if (item.children.length) { markmap += from_tree(item.children, options);