Anonymous

Module:Items/SourceTables/Sandbox: Difference between revisions

From Melvor Idle
m
no edit summary
m (Fix trimming of sort value)
mNo edit summary
Line 801: Line 801:
-- Retrieve numeric level value for sorting, or remove anything between [[]]
-- Retrieve numeric level value for sorting, or remove anything between [[]]
local levelValue = level:match("Level (%d+)")
local levelValue = level:match("Level (%d+)")
if not levelValue then levelValue = value:match("%[%[.-%]%]%s*(%w+)$") end
if not levelValue then levelValue = level:match("%[%[.-%]%]%s*(%w+)$") end
table.insert(rowPart, '\r\n|style="text-align: left;" data-sort-value="'..levelValue..'"|'..expIcon.. level)
table.insert(rowPart, '\r\n|style="text-align: left;" data-sort-value="'..levelValue..'"|'..expIcon.. level)
table.insert(rowPart, '\r\n|style="text-align: right;" data-sort-value="'..qty..'"|'..Shared.formatnum(minqty))
table.insert(rowPart, '\r\n|style="text-align: right;" data-sort-value="'..qty..'"|'..Shared.formatnum(minqty))
2,875

edits