diff --git a/eid_api.lua b/eid_api.lua index 913b92e5..9f6f93c0 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -185,7 +185,12 @@ end -- Returns the inlineIcon object of a given Iconstring -- can be used to validate an iconstring function EID:getIcon(str) - return EID.InlineIcons[string.gsub(str, "{{(.-)}}", function(a) return a end)] or nil + local strTrimmed = string.gsub(str, "{{(.-)}}", function(a) return a end) + if #strTrimmed < #str then + return EID.InlineIcons[strTrimmed] or nil + else + return nil + end end -- Returns the width of a given string in Pixels