切换搜索
搜索
切换菜单
notifications
切换个人菜单
查看“模块:String2BulletedList”的源代码
来自决策链云智库
更多操作
←
模块:String2BulletedList
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
-- Module:StringSplit2BulletedList local p = {} function p.bulletedList(frame) -- Get the input string from the template local input = frame.args[1] or '' -- Get the prefix and suffix from the template local prefix = '{{Pcnodeoutput|' local suffix = '}}' -- Split the input string by space into a table local keywords = mw.text.split(input, ';%s*') -- Create the bulleted list from the table local list = mw.html.create('ul') for i, keyword in ipairs(keywords) do list:tag('li'):wikitext(prefix .. keyword .. suffix):done() end return tostring(list) end return p
调试控制台
* 此模块的返回的值存于控制台变量“p”中,包括没有保存的变更。 * 在一行的前面加上“=”可以将其作为表达式来计算或使用print()显示。显示表格请使用mw.logObject()。 * 在模块代码中使用mw.log()和mw.logObject()来向控制台发送消息。
本页使用的模板:
模块:String2BulletedList/doc
(
查看源代码
)
返回
模块:String2BulletedList
。