Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:TestAdjuster: Difference between revisions

From Teriock
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
     -- Check for content as a positional or named argument
     -- Check for content as a positional or named argument
     local content = frame.args[1] or frame.args.content or "No input provided."
     local content = frame.args[1] or frame.args.content or "No input provided."
     local replacedContent = content:gsub("foo", "bar")
     local replacedContent = content:gsub("==", "===")
     return replacedContent -- Only return the modified string
     return replacedContent -- Only return the modified string
end
end


return p
return p

Latest revision as of 02:26, 26 December 2024

Documentation for this module may be created at Module:TestAdjuster/doc

local p = {}

function p.testReplace(frame)
    -- Check for content as a positional or named argument
    local content = frame.args[1] or frame.args.content or "No input provided."
    local replacedContent = content:gsub("==", "===")
    return replacedContent -- Only return the modified string
end

return p