模块:ESSAY:修订间差异
来自高中笔记
更多操作
创建模块,用于 模板:杂谈 |
修正代码(%s -> args[1]) |
||
| 第8行: | 第8行: | ||
local topic = args[1] or "主题未定义" | local topic = args[1] or "主题未定义" | ||
local text = string.format( | local text = string.format( | ||
"这是一篇有关于[[分类: | "这是一篇有关于[[分类:|" .. args[1] .."]]的杂谈。点击[[分类:杂谈|这里]]查看全部的杂谈。", | ||
topic, topic | topic, topic | ||
) | ) | ||
2025年7月14日 (一) 14:18的版本
ESSAY 模块使用文档
本模块用于模板:杂谈,详细内容可参考模板页。
脚本错误:Lua错误:内部错误:解释器以状态127退出。
-- Module:ESSAY coded by Jerry N. Karlbaey (User:Karlbaey)
-- Usage: Module:ESSAY/doc
-- This Lua script is for Template:杂谈
local p = {}
function p.main(frame)
local args = frame:getParent().args
local topic = args[1] or "主题未定义"
local text = string.format(
"这是一篇有关于[[分类:|" .. args[1] .."]]的杂谈。点击[[分类:杂谈|这里]]查看全部的杂谈。",
topic, topic
)
return text
end
return p