Skip to content

Commit a409e5c

Browse files
committed
style(export): format linkify module refs
1 parent aea5ed5 commit a409e5c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

scripts/export.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,15 @@ local function linkify_mods_refs(s)
273273
local anchor = heading_anchor(member_name)
274274
return fmt("[`%s`](/modules/%s#fn-%s)", ref, module_name:lower(), anchor)
275275
end)
276-
return (s:gsub("`(mods%.[%a_][%w_]*)`", function(ref)
277-
local module_name = ref:match("^mods%.([%a_][%w_]*)$")
278-
if not module_name then
279-
return "`" .. ref .. "`"
280-
end
281-
return fmt("[`%s`](/modules/%s)", ref, module_name:lower())
282-
end))
276+
return (
277+
s:gsub("`(mods%.[%a_][%w_]*)`", function(ref)
278+
local module_name = ref:match("^mods%.([%a_][%w_]*)$")
279+
if not module_name then
280+
return "`" .. ref .. "`"
281+
end
282+
return fmt("[`%s`](/modules/%s)", ref, module_name:lower())
283+
end)
284+
)
283285
end
284286

285287
local function normalize_api_desc(desc)

0 commit comments

Comments
 (0)