Jump to content

Module:TemplateBox and Module:TemplateBox/sandbox: Difference between pages

(Difference between pages)
Content deleted Content added
use require('strict') instead of require('Module:No globals')
 
FeRDNYC (talk | contribs)
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)
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 = { 'poem', result } }
result = frame:callParserFunction{ name = '#tag', args = { '', result } }
end
end
return result
return result