跳转到内容

模組:Cite

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Kcx36留言 | 贡献2025年7月19日 (六) 17:53 (// InPageEdit)编辑。这可能和当前版本存在着巨大的差异。

local p = {}
local CS1 = require('Module:Citation/CS1')

p[''] = function(frame)
    local templateName = frame.args[1] or ''
    local newFrame = {
        getParent = function(self)
            return frame
        end,
        getTitle = function(self)
            return 'Module:Citation/CS1'
        end,
        args = {CitationClass = templateName:lower()}
    }
    setmetatable(newFrame, {
        __index = function(t, k)
            if type(frame[k]) == 'function' then
                return function(...)
                    return frame[k](frame, select(2, ...))
                end
            else
                return frame[k]
            end
        end
    })
    return CS1.citation(newFrame)
end

return p