Module:PrettyQuestLink
Appearance
Documentation for this module may be created at Module:PrettyQuestLink/doc
local p = {}
function p.pretty(frame)
local raw = frame.args[1] or ""
raw = mw.text.trim(raw)
-- Extract subpage name if in format "Quest/Some Quest"
local _, quest = string.match(raw, "^(.-)/(.+)$")
local label = quest or raw -- fallback to full name if not a subpage
return string.format("[[%s|%s]]", raw, label)
end
return p