aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-04-21 12:17:44 -0400
committerAdam Harrison <adamdharrison@gmail.com>2024-04-21 12:17:44 -0400
commitb9723c0b1ed0580268aaac058866bc1d1366b783 (patch)
treea88235a0c959ab294498b78db18175876936bb5a /src
parenta202d2a2a3904006d33076ebae9a99810dae87da (diff)
downloadlite-xl-plugin-manager-b9723c0b1ed0580268aaac058866bc1d1366b783.tar.gz
lite-xl-plugin-manager-b9723c0b1ed0580268aaac058866bc1d1366b783.zip
Fixed commas.
Diffstat (limited to 'src')
-rw-r--r--src/lpm.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index e39d1a9..e59fcc0 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -2452,13 +2452,15 @@ not commonly used publically.
local func, err = load("local addon = ... " .. (amount == 2 and "return" or "") .. " " .. chunk)
if err then error(string.format("can't parse chunk %s: %s", chunk, err)) end
result[i] = func
+ offset = arg:find(",", e + 1)
+ if offset then offset = offset + 1 else offset = #arg end
+ else
+ s,e = arg:find("%s*,%s*", offset)
+ if not e then s,e = #arg+1, #arg end
+ if offset >= e then break end
+ result[i] = arg:sub(offset, s - 1)
offset = e + 1
end
- s,e = arg:find("%s*,%s*", offset)
- if not e then s,e = #arg+1, #arg end
- if offset >= e then break end
- result[i] = arg:sub(offset, s - 1)
- offset = e + 1
i = i + 1
end
if ARGS["table"] then