Module:TestAdjuster: Difference between revisions
From Teriock
More actions
Created page with "local p = {} function p.testReplace(frame) local content = frame:getParent().args[1] or "" return content:gsub("foo", "bar") end return p" |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
function p.testReplace(frame) | function p.testReplace(frame) | ||
local content = 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 | 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