Module:Tt: Difference between revisions

Kuhlau (talk | contribs)
implement draft
Kuhlau (talk | contribs)
No edit summary
Line 19: Line 19:
function p._main(args, options, frame)
function p._main(args, options, frame)
local text = args[1]
local text = args[1]
local tooltip = mw.text.decode(args[2], true)
local tooltip = mw.text.decode(args[2], true) or nil
local header = lib.isNotEmpty(args.header) and mw.text.decode(args.header, true) or nil
local header = lib.isNotEmpty(args.header) and mw.text.decode(args.header, true) or nil
local class = lib.isNotEmpty(args.class) and args.class .. ' custom-tt-wrapper toggle-tooltip' or 'custom-tt-wrapper toggle-tooltip'
local class = lib.isNotEmpty(args.class) and args.class .. ' custom-tt-wrapper toggle-tooltip' or 'custom-tt-wrapper toggle-tooltip'