From 62a955148c2af14f863f7a6f9e581a273466f850 Mon Sep 17 00:00:00 2001 From: Ryosuke Yasuoka Date: Sat, 13 Jun 2026 13:43:33 +0900 Subject: [PATCH] fix(export/html): use link_description for anchor content The wrap_anchor() recollector used output[1] as the display text, but output ordering differs between link ({url}[text]) and anchor_definition ([text]{url}) nodes. Use state.link.link_description which is consistent regardless of syntax. Also fix the fallback from the nonexistent link_text field to link_location_text. --- lua/neorg/modules/core/export/html/module.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/neorg/modules/core/export/html/module.lua b/lua/neorg/modules/core/export/html/module.lua index 88bb1ae3b..befdf41e9 100644 --- a/lua/neorg/modules/core/export/html/module.lua +++ b/lua/neorg/modules/core/export/html/module.lua @@ -205,10 +205,10 @@ local function wrap_anchor() end local content - if #output > 0 and output[1] ~= "" then - content = output[1] + if state.link and state.link.link_description then + content = state.link.link_description else - content = state.link.link_text + content = state.link.link_location_text end output = {