Module:OOOInfoBox: Difference between revisions
Created page with "local p = {} local DOCS_TITLE = 'Data:Docs.json' -- Load the JSON docs file local function load_docs() local t = mw.title.new(DOCS_TITLE) if not t then return {} end local content = t:getContent() or '' if content == '' then return {} end local ok, data = pcall(mw.text.jsonDecode, content) return (ok and type(data) == 'table') and data or {} end local DOCS = load_docs() -- Small helper local function pick(args, data, key) local v = args[key..." |
No edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local DOCS_TITLE = ' | local DOCS_TITLE = 'Template:Docs.json' | ||
-- Load the JSON docs file | -- Load the JSON docs file |