Modulo:Sandbox/Sakretsu: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m + |
test |
||
Riga 1:
local p = {}
function p.
local
if template_name == '' then return end
local
if first_char then
first_char = string.format('[%s%s]', first_char:upper(), first_char:lower())
template_name = template_name:gsub('^.', first_char)
local content = mw.title.getCurrentTitle():getContent()
content = content:gsub('<[Rr][Ee][Ff].->.-</[Rr][Ee][Ff]%s*>', '')
if content:match('{{%s*' .. template_name .. '%s*[|}]') then
return 1
▲ end
else
return
end
end
|