Fixed issue where getIcon worked for non encapsuled Strings
This commit is contained in:
1 parent
155803bebc
commit
4e4cb936c9
1 file changed
+6
-1
+6
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user