- Welcome to Touhou Wiki!
- Registering is temporarily disabled. Check in our Discord server to request an account and for assistance of any kind.
Module:Test: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary Tags: Mobile edit Mobile web edit |
mNo edit summary Tags: Mobile edit Mobile web edit |
||
Line 18: | Line 18: | ||
end | end | ||
output = | output = section[1] | ||
return output | return output | ||
end | end | ||
return p | return p |
Revision as of 02:21, 28 September 2022
Documentation for this module may be created at Module:Test/doc
local p = {}
function p.main(frame)
--Get article
local args = frame.args
local title = args.title
local title = mw.title.new(title)
local article = title:getContent()
local header = {}
local section = mw.text.split(article, "==.-==")
local i = 1
--Split article
for s in string.gmatch(article, "==(.-)==") do
header[s] = section[i]
i = i+1
end
output = section[1]
return output
end
return p