local p = {}
function p.replace(frame)
    -- Simple find-and-replace so that there's less of a need for instances of nearly identical text.
    -- Usage: {{#invoke:replace|replace|text|pattern to remove|pattern to insert}}
    text = frame.args[1]
    new_text, _ = string.gsub(text, frame.args[2], frame.args[3])
    return new_text
function p.convertEvidence(frame)
    -- Replaces instances of dots with line breaks. Meant to be used on Template:CaseData.
    newFrame = frame:getParent()
    newFrame.args[2] = "·"
    newFrame.args[3] = "<br>"
    return p.replace(newFrame)
return p
Community content is available under CC-BY-SA unless otherwise noted.