Merge pull request #449 from Xertis/patch-5

Bug fix gui.template
This commit is contained in:
MihailRis 2025-01-26 05:55:32 +03:00 committed by GitHub
commit abfbf6bffc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,8 +194,8 @@ function gui.template(name, params)
text = text:gsub("if%s*=%s*'%%{%w+}'", "if=''")
text = text:gsub("if%s*=%s*\"%%{%w+}\"", "if=\"\"")
-- remove unsolved properties: attr='%{var}'
text = text:gsub("%w+%s*=%s*'%%{%w+}'%s?", "")
text = text:gsub("%w+%s*=%s*\"%%{%w+}\"%s?", "")
text = text:gsub("%s*%S+='%%{[^}]+}'%s*", " ")
text = text:gsub('%s*%S+="%%{[^}]+}"%s*', " ")
return text
end