View source for Module:Outdent
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p.outdent (frame)
local args = getArgs(frame)
local width = 0
local reversed = args['reverse'] or args['indent'] or args['r'] or args['in'] -- aliases for reverse
if not args[1] then args[1] = '' end -- un-nil args[1]
width = width + select(2, string.gsub(args[1],':','')) -- increase by 1 for every :
width = width + select(2, string.gsub(args[1],'*','')) -- increase by 1 for every *
width = width + select(2, string.gsub(args[1],'#','')) * 2 -- increase by 2 for every #
if width == 0 then width = tonumber(args[1]) end -- set width to args[1] if needed
if not width then width = 10 end -- default width
if width < 0
then
width = -width
reversed = not reversed
end
000
1:0
Template used on this page:
Return to Module:Outdent.