Difference between revisions of "Module:IDs"
Jump to navigation
Jump to search
m |
m |
||
Line 12: | Line 12: | ||
function p.makeId(frame) | function p.makeId(frame) | ||
return "<span style=\"font-family: monospace; font-size: 13px;\">" .. linkID(frame:getParent().args[1]) .. "</span>" | return "<span style=\"font-family: monospace; font-size: 13px;\">" .. linkID(frame:getParent().args[1]) .. "</span>" | ||
+ | end | ||
+ | |||
+ | function p.makeInternalLinkId(frame) | ||
+ | return "[[" .. frame:getParent().args[1] .. "|<span style=\"font-family: monospace; font-size: 13px;\">" .. frame:getParent().args[1] .. "</span>]]" | ||
end | end | ||
Revision as of 08:47, 19 May 2020
Documentation for this module may be created at Module:IDs/doc
local p = {}; function p.makeList(frame) local ids = frame:getParent().args[1] local ret = "<span style=\"font-family: monospace; font-size: 13px;\">" for v in string.gmatch(ids, "([A-Z0-9]+)") do ret = ret .. linkID(v) .. " " end return ret .. "</span>" end function p.makeId(frame) return "<span style=\"font-family: monospace; font-size: 13px;\">" .. linkID(frame:getParent().args[1]) .. "</span>" end function p.makeInternalLinkId(frame) return "[[" .. frame:getParent().args[1] .. "|<span style=\"font-family: monospace; font-size: 13px;\">" .. frame:getParent().args[1] .. "</span>]]" end function linkID(id) return id end return p