This documentation is transcluded from Module:Keyword/doc. Changes can be proposed in the talk page.
| Module:Keyword loads configuration from Module:Keyword/config.json. This module can be configured from the config.json subpage. |
See Template:Keyword for usage instructions.
local getArgs = require('Module:Arguments').getArgs
local p = {}
local root
function p.main(frame)
local args = getArgs(frame, { parentOnly = true })
return p._main(args)
end
function p._main(args)
local config = mw.loadJsonData( 'Module:Keyword/config.json' )
root = mw.html.create('span')
root
:css('color', config[string.lower(args[1])] or 'inherit')
:wikitext( args[1] )
return tostring(root)
end
return p