diff --git a/src/App.lua b/src/App.lua index 912f59b..ce4fb51 100644 --- a/src/App.lua +++ b/src/App.lua @@ -66,26 +66,18 @@ end -- Fixes "invalid unicode" error w/ EditTextAsync if there's unicode in any closure comments removed from orig. -- This was taken from our LuaEncode project: https://github.com/regginator/LuaEncode/blob/master/src/LuaEncode.lua#L48-L86 local EscapeUnicode do - local SpecialCharacters = { - ["\a"] = "\\a", -- Bell; ASCII #7 - ["\b"] = "\\b", -- Backspace; ASCII #8 - ["\t"] = "\\t", -- Horizontal-Tab; ASCII #9 - ["\n"] = "\\n", -- Newline; ASCII #10 - ["\v"] = "\\v", -- Vertical-Tab; ASCII #11 - ["\f"] = "\\f", -- Form-Feed; ASCII #12 - ["\r"] = "\\r", -- Carriage-Return; ASCII #13 - } + local SpecialCharacters = {} for Index = 0, 255 do local Character = string.char(Index) - if not SpecialCharacters[Character] and (Index < 32 or Index > 126) then + if not SpecialCharacters[Character] and Index > 126 then SpecialCharacters[Character] = "\\" .. Index end end function EscapeUnicode(inputString) - return string.gsub(inputString, "[\"\\\0-\31\127-\255]", SpecialCharacters) + return string.gsub(inputString, "[\127-\255]", SpecialCharacters) end end diff --git a/version.txt b/version.txt index 7dff5b8..f477849 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.2.1 \ No newline at end of file +0.2.2 \ No newline at end of file diff --git a/wally.lock b/wally.lock index 2f30a11..cd53aed 100644 --- a/wally.lock +++ b/wally.lock @@ -4,7 +4,7 @@ registry = "test" [[package]] name = "latte-soft/maui" -version = "0.2.1" +version = "0.2.2" dependencies = [["LuaEncode", "regginator/luaencode@1.1.5"]] [[package]] diff --git a/wally.toml b/wally.toml index 8a019b6..1fc8a37 100644 --- a/wally.toml +++ b/wally.toml @@ -1,7 +1,7 @@ [package] name = "latte-soft/maui" description = "Roblox Studio Plugin for Packing Modules as Executable Luau Scripts" -version = "0.2.1" +version = "0.2.2" license = "LGPL-3.0-only" authors = [ "Latte Softworks ",