View source for Module:Tmpl
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
-- This is a helper module for {{tmpl}}
require('Module:No globals')
-- The trailing `[^0-9]?` ensures that `$10` doesn't potentially change
-- from being treated as `${1}0` to being treated as `${10}`
-- if the number of supported parameters is ever expanded:
local PATTERN = "%$([1-9])[^0-9]?"
local this = {}
function this.renderTmpl(frame)
local args = frame.args
local pargs = (frame:getParent() or {}).args
local input = pargs[0] or ''
local result = {}
local prevPos = 1
do
local startPos, _, k
while true do
000
1:0
Template used on this page:
Return to Module:Tmpl.