From ed0fef5548ff258114afcbe66383dbe0007c1d09 Mon Sep 17 00:00:00 2001 From: kilbith Date: Thu, 17 Sep 2015 22:09:48 +0200 Subject: [PATCH] Better Lua pattern for description --- worktable.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worktable.lua b/worktable.lua index 339412a..6b2057e 100644 --- a/worktable.lua +++ b/worktable.lua @@ -190,8 +190,8 @@ xdecor.register("worktable", { }) local function description(node, shape) - local desc = string.gsub(string.gsub(node:match(":(.+)"):gsub("_%l", string.upper), - "_", " "), "^%l", string.upper).." "..shape:gsub("^%l", string.upper) + local desc = node:gsub("%w+:", " "):gsub("_", " "):gsub(" %l", string.upper):sub(2).. + " "..shape:gsub("^%l", string.upper) return desc end