Module:Command: Difference between revisions

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
m cleanup the html\css output
Line 109: Line 109:
local attr
local attr
if args.long == '1' then
if args.long then
attr = 'style="display:block;padding:0.8em 1em;margin-bottom:0.4em;word-wrap:break-word"'
attr = 'style="display: block; padding: 0.8em 1em; margin-bottom: 0.4em; word-wrap: break-word;"'
else
else
attr = 'style="word-break: break-all"'
attr = 'style="word-break: break-all;"'
end
end
return '<!-- Command --><code ' .. attr .. '>' .. slash .. table.concat( command, ' ' ):gsub( '&#32;', ' ' ) .. '</code><!-- /Command -->'
return '<!-- Command start --><code ' .. attr .. '>' .. slash .. table.concat( command, ' ' ):gsub( '&#32;', ' ' ) .. '</code><!-- Command end -->'
end
end
return p
return p