Module:Misc

-- Simple text parsing that do not fit in other modules

local getArgs = require('Module:Arguments').getArgs local mergeArgsSyntax = require('Module:Arguments').mergeArgsSyntax local loader = require('Module:Loader')

local string, table, yesno = loader.require('String', 'Table', 'Yesno')

local p = {}

function p.sprayInkTooltip(frame) local args = getArgs(frame) local inklist = mergeArgsSyntax({ args.inklist or args[1] }) local inkstring = '' inklist = table.map(inklist, function (v)		local num, item = v:match('%s*(%d+)x?%s+(.*)%s*')		if num and item then			return ('&7 %s: &a%s%%'):format(item, num)		end	end) return table.concat(inklist, '/') end

return p