8,756
edits
(cleaned up my very first lua module into something actually legible. also, now properly preserves whitespace if there is is a space between the color code and the actual text) |
m (standardized what linebreak to use) |
||
Line 29: | Line 29: | ||
b = string.gsub(b,"([{}])", "") | b = string.gsub(b,"([{}])", "") | ||
elseif type == 'notxml' then | elseif type == 'notxml' then | ||
b = string.gsub(b,"(\\n)"," | b = string.gsub(b,"(\\n)","\n") | ||
end | end | ||
return b | return b | ||
Line 35: | Line 35: | ||
function linebreaks(frame) | function p.linebreaks(frame) | ||
local b = string.gsub(frame.args[1],"(~)"," | local b = string.gsub(frame.args[1],"(~)","\n") | ||
return b | return b | ||
end | end |