Module:SingleLink
Appearance
Documentation for this module may be created at Module:SingleLink/doc
local p = {}
function p.fromNotation(frame)
local raw = frame.args[1] or ""
local parts = mw.text.split(raw, "::")
local target = mw.text.trim(parts[1])
local label = parts[2] and mw.text.trim(parts[2]) or target
if target == "" then
return ""
end
return string.format('[[%s|%s]]', target, label)
end
return p