Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
Fix codegen not working when minified, bump version (0.1.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
regginator committed Jan 8, 2023
1 parent afcb7f4 commit a766a0f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
14 changes: 3 additions & 11 deletions src/App.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.2
2 changes: 1 addition & 1 deletion wally.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -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 <latte.to>",
Expand Down

0 comments on commit a766a0f

Please sign in to comment.