Module:DifficultyTexts

local Util = require 'Module:Util' local Hash = require 'Module:HashUtil'

local main = function (args) local texts = {} for dif, text in Hash.sorted_pairs(args, function (_, _, k1, k2) return Util.difficultySort(k1, k2) end) do		texts[#texts + 1] = ('%s&ensp;(%s)'):format(text, dif) end return table.concat(texts, ' ') end

return require 'Module:MakeMWModule'.makeMWModule({main = main}, {wrappers = 'Template:DifficultyTexts'})