Module:TemplateBox and Module:TemplateBox/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
use require('strict') instead of require('Module:No globals') |
Attempt to replace poem tag with pre, and avoid non-breaking spaces to improve copy-paste |
||
Line 342: | Line 342: | ||
eachArg(function( arg ) |
eachArg(function( arg ) |
||
local space = '' |
local space = '' |
||
if align then |
if align then |
||
space = ('&;'):rep(maxArgLen - #arg) |
|||
end |
end |
||
table.insert( args, argName .. space .. equal ) |
table.insert( args, argName .. space .. equal ) |
||
Line 360: | Line 360: | ||
if multiline then |
if multiline then |
||
-- Preserve whitespace in front of new lines |
-- Preserve whitespace in front of new lines |
||
result = frame:callParserFunction{ name = '#tag', args = { ' |
result = frame:callParserFunction{ name = '#tag', args = { '', result } } |
||
end |
end |
||
return result |
return result |