See Freopedia:To be done for details.


local p = {}

p.main = function ( frame )
    if frame.args == nil then
        return 'No args provided'
    end
    local args = frame.args

    local sup = mw.html.create( 'sup' )
    sup:attr( 'class', 'todo' )

    local em = sup:tag( 'em' )
    em:wikitext( mw.text.nowiki( '[' ), '[[Project:To be done|TODO]]' )
    if args.comment ~= nil and args.comment ~= '' then
        em:wikitext( '&nbsp;&ndash; <span>' .. args.comment .. '</span>' )
    end
    em:wikitext( mw.text.nowiki( ']' ) )

    return tostring( sup )
end

return p