因为以下原因,您没有权限编辑本页:
您可以查看和复制此页面的源代码。
-- 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)
000
1:0
本页使用的模板: