require('strict');-- local function math_test (frame) local math_title = frame.args['math-title']; if math_title:find ('\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127') then return '
math-title has...
local count; str, count = str:gsub ('%$', '%1'); -- there must be $-delimited text and the delimters must be balanced if 0
for _, stripmarker in ipairs (math_t) do str = str:gsub (pattern, stripmarker, 1); -- replace $-delimited math text with matching strip marker end str = str:gsub (escaped, '%$'); -- replace special secret EScApEd keyword with unescaped form '$' return table.concat ;end
local function math_test2 (frame) local math_title = frame.args['math-title']; if math_title:find ('\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127') then return '
math-title has...
if not str:find (pattern) then -- there must be \(...\) delimited text and the delimters must be balanced return '
|math-title= missing TeX delimiters'; endfor math_str in str:gmatch (pattern) do -- walk through the text and for each \(...\) delimited math text math_str = math_str:gsub (pattern, ''); -- replace the delimiters math_str = frame:preprocess (math_str); -- preprocess math text into a math strip marker table.insert (math_t, math_str); -- and save the math strip marker end
for _, stripmarker in ipairs (math_t) do str = str:gsub (pattern, stripmarker, 1); -- replace \(...\) delimited math text with matching strip marker end
return table.concat ;end
local function span_test (frame) local span_str = frame.args[1]; local patterns_t = for _, pattern_t in ipairs (patterns_t) do span_str = span_str:gsub (pattern_t[1], pattern_t[2]); end
local count = 1; while 0 ~= count do span_str, count = span_str:gsub ('
(.-)', '%1'); endreturn span_str;end
return