Module:Table template counter and Module:Table template counter/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
mNo edit summary |
←Created page with '-- This module counts table rows with specified template name in wikitext. local p = {} local getArgs function p.main(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._main(getArgs(frame, {wrappers = 'Template:Table template counter'})) end function p._main(args) -- Get the title object. local titleObj do local success success, titleObj = pcall(mw.title.new, args.page) if not success or not titleObj then...' |
||
Line 65: | Line 65: | ||
do |
do |
||
local temp |
local temp |
||
temp, count = |
temp, count = wikitable:gsub('|%-[|\n%-:;=\"\'%[%w%s%(%)%]]*%{%{'..args.templatename..'|[\'%[%a%s%(%|%d%)%]]+%}%}', '{{'..args.templatename..'}}') |
||
end |
end |
||
end |
end |