Module:Command: Difference between revisions

No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 175: Line 175:
local attr = ''
local attr = ''
if args.long then
if args.long then
attr = 'style="display: block; padding: 0.8em 1em; margin-bottom: 0.4em; word-warp: break-word;"'
attr = 'style="display: flex; padding: 0.8em 1em; margin-bottom: 0.4em; word-warp: break-word;"'
end
end
Line 183: Line 183:
result = result:gsub( '<', '&lt;' ):gsub( '&lt;(!%-%- Command %-%->)&lt;','<%1<'):gsub( '&lt;/code>&lt;(!%-%- /Command %-%->)','</code><%1')
result = result:gsub( '<', '&lt;' ):gsub( '&lt;(!%-%- Command %-%->)&lt;','<%1<'):gsub( '&lt;/code>&lt;(!%-%- /Command %-%->)','</code><%1')
end
end
result = '<!-- Command --><code ' .. attr .. '>' .. slash .. result .. '</code><!-- /Command -->'
result = '<!-- Command --><code ' .. attr .. '><span>' .. slash .. result .. '</span></code><!-- /Command -->'
     if needFormat then
     if needFormat then
         result = result .. '[[Category:Pages using deprecated command module]]'
         result = result .. '[[Category:Pages using deprecated command module]]'