Module:Command: Difference between revisions

please dont nowrap
Undo revision 1361995 by Nixinova (talk) That made every single use of {{command}} display in the long format, which is a mess... I copied the style you changed on {{code}} so hopefully that's good
Line 108: Line 108:
end
end
local attr = 'style="display: block; padding: 0.8em 1em; margin-bottom: 0.4em; word-wrap: break-word;"'
local attr
if args.long == '1' then
attr = 'style="display:block;padding:0.8em 1em;margin-bottom:0.4em;word-wrap:break-word"'
else
attr = 'style="word-break: break-all"'
end
return '<!-- Command --><code ' .. attr .. '>' .. slash .. table.concat( command, ' ' ):gsub( '&#32;', ' ' ) .. '</code><!-- /Command -->'
return '<!-- Command --><code ' .. attr .. '>' .. slash .. table.concat( command, ' ' ):gsub( '&#32;', ' ' ) .. '</code><!-- /Command -->'
end
end
return p
return p