Module:Consecutive links

From Caves of Qud Wiki
Revision as of 18:51, 23 July 2019 by Teamtoto (talk | contribs) (ignores white space and can specify what the replacer char can be)
Jump to navigation Jump to search

local p = {}

function p.parse(frame)
local separator = frame.args[2]
local replacer = frame.args[3]
local b = string.gsub(frame.args[1], "%s*" .. separator .. "%s*", "]]" .. replacer .. "[[")
return "[[".. b .. "]]"
end
return p