Module:Good article topics: Difference between revisions
Jump to navigation
Jump to search
m Protected Module:Good article topics: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) |
m 1 revision imported from Wikipedia:Module:Good_article_topics |
(No difference)
|
Latest revision as of 00:57, 27 May 2025
Documentation for this module may be created at Module:Good article topics/doc
-- This module implements {{GA/Topic}}.
local p = {}
function p.main(frame)
local topic = frame:getParent().args[1]
if not topic then
return ''
end
topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace
local ret
if topic ~= '' then
ret = p._main(topic)
end
ret = ret or ''
return ret
end
function p._main(topic)
topic = topic:lower()
local data = mw.loadData('Module:Good article topics/data')
return data[topic]
end
return p