Modul:BracketWithEnumeration
Aspect
Documentația acestui modul poate fi creată la Modul:BracketWithEnumeration/doc
local StringUtils = require('Modul:StringUtils')
local TableTools = require('Modul:TableTools')
local getArgs = require('Modul:Arguments').getArgs
local p = {}
p.fromArgs = function(args)
local bracketContent = StringUtils._emptyToNil({mw.text.listToText(args, '; ', '; ')})
if bracketContent then
return StringUtils._encloseString({bracketContent, '(', ')'})
else
return ''
end
end
p.fromFrame = function(frame)
local args = getArgs(frame)
args = TableTools.compressSparseArray(args)
return p.fromArgs(args)
end
return p