Module:Sandbox/LVL: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary |
Replaced content with "local p = {} function p.replaceNewlines(frame) local text = frame.args[1] or '' -- Replace \r\n or \n with <br/> text = text:gsub('\r\n', '<br/>'):gsub('\n', '<br/>') return text end return p" Tag: Replaced |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.replaceNewlines(frame) | |||
local text = frame.args[1] or '' | |||
-- Replace \r\n or \n with <br/> | |||
text = text:gsub('\r\n', '<br/>'):gsub('\n', '<br/>') | |||
return text | |||
p. | |||
local | |||
-- | |||
return | |||
end | end | ||
return p | return p | ||
Revision as of 23:27, 5 July 2026
Documentation for this module may be created at Module:Sandbox/LVL/doc