From 4e1c47b3fd54bdd5b395da6278fa7de82eaecb61 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 19 Feb 2024 23:49:52 +0100 Subject: [PATCH] item_transport.lua: use string:trim() method. Signed-off-by: Slava Zanko --- item_transport.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/item_transport.lua b/item_transport.lua index d1eb9b5..43b4272 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -10,7 +10,7 @@ if pipeworks.enable_item_tags then pipeworks.safe_tag = function(tag) if tag == nil or type(tag) ~= "string" or tag == "" then return nil end tag = tag:gsub(",", "_") -- replace commas with underscores - tag = tag:match("^%s*(.-)%s*$") -- trim leading and trailing spaces + tag = tag:trim() -- trim leading and trailing spaces return tag:sub(1, item_tag_name_limit) end