Skip to content

Commit d8efdd1

Browse files
committed
Fixed '[' ']' and '~' symbols not being squished.
1 parent 287850b commit d8efdd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

util/SQUISH.LUA

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ local function Squish(fileName)
107107
local function removeWhiteSpace(tokens)
108108
for _, token in ipairs(tokens) do
109109
if token.type == "code" then
110-
token.value = token.value:gsub("%s+", " ") -- Replace multiple spaces with a single space
111-
token.value = token.value:gsub("%s*([%(%){}<>.,:;=%+%-%*/%^])%s*", "%1") -- Remove spaces around operators and punctuation
112-
token.value = token.value:gsub("^%s+", "") -- Remove leading whitespace
113-
token.value = token.value:gsub("%s+$", "") -- Remove trailing whitespace
110+
token.value = token.value:gsub("%s+", " ") -- Replace multiple spaces with a single space
111+
token.value = token.value:gsub("%s*([%[%]%(%){}<>.,:;=%+%-%*/%^%~])%s*", "%1") -- Remove spaces around operators and punctuation
112+
token.value = token.value:gsub("^%s+", "") -- Remove leading whitespace
113+
token.value = token.value:gsub("%s+$", "") -- Remove trailing whitespace
114114
end
115115
end
116116
end

0 commit comments

Comments
 (0)