More actions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
-- Get and preprocess the input |
-- Get and preprocess the input |
||
local raw_input = frame.args[1] or '' |
local raw_input = frame.args[1] or '' |
||
local processed_input = |
local processed_input = raw_input:gsub('road', 'street') |
||
-- Debug output |
-- Debug output |
||
Line 10: | Line 10: | ||
"Raw input:\n<pre>%s</pre>\n\nProcessed input:\n<pre>%s</pre>", |
"Raw input:\n<pre>%s</pre>\n\nProcessed input:\n<pre>%s</pre>", |
||
raw_input, |
raw_input, |
||
processed_input |
|||
'test' |
|||
) |
) |
||
end |
end |
Revision as of 11:51, 14 January 2025
Documentation for this module may be created at Module:Transclude/doc
local p = {}
function p.transclude(frame)
-- Get and preprocess the input
local raw_input = frame.args[1] or ''
local processed_input = raw_input:gsub('road', 'street')
-- Debug output
return string.format(
"Raw input:\n<pre>%s</pre>\n\nProcessed input:\n<pre>%s</pre>",
raw_input,
processed_input
)
end
return p