Better Lua pattern for description

This commit is contained in:
kilbith 2015-09-17 22:09:48 +02:00
parent 40f473aee1
commit ed0fef5548

View File

@ -190,8 +190,8 @@ xdecor.register("worktable", {
}) })
local function description(node, shape) local function description(node, shape)
local desc = string.gsub(string.gsub(node:match(":(.+)"):gsub("_%l", string.upper), local desc = node:gsub("%w+:", " "):gsub("_", " "):gsub(" %l", string.upper):sub(2)..
"_", " "), "^%l", string.upper).." "..shape:gsub("^%l", string.upper) " "..shape:gsub("^%l", string.upper)
return desc return desc
end end