local p =
local state_initial = 1local state_first_open_brace = 2local state_first_closing_brace = 3
local c_open_brace = string.byte("")
function p.number_of_templates(content) if content
state_initial then if c
c_close_brace then state = state_first_closing_brace end elseif state
c_open_brace then state = state_initial level = level + 1 else state = state_initial end elseif state
c_close_brace then level = level - 1 if level
function p.multiple_issues(frame) local frame = mw.getCurrentFrame local first = frame.args[1] local second = frame.args[2] if p.number_of_templates(first) > 1 then return second end return firstend
return p