Module:Sidebar: Difference between revisions
newline fix |
apply automatic newlines |
||
Line 268: | Line 268: | ||
for k, v in pairs(origArgs) do | for k, v in pairs(origArgs) do | ||
if v ~= '' then | if v ~= '' then | ||
-- Apply automatic newlines ([[meta:Help:Newlines and spaces#Automatic newline]]) to | |||
-- simulate template behavior. | |||
if mw.ustring.find(v, '^[#*:;]') or mw.ustring.find(v, '^{|') then | |||
v = '\n' .. v | |||
end | |||
args[k] = v | args[k] = v | ||
end | end |