diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-04-21 12:17:44 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-04-21 12:17:44 -0400 |
commit | b9723c0b1ed0580268aaac058866bc1d1366b783 (patch) | |
tree | a88235a0c959ab294498b78db18175876936bb5a /src | |
parent | a202d2a2a3904006d33076ebae9a99810dae87da (diff) | |
download | lite-xl-plugin-manager-b9723c0b1ed0580268aaac058866bc1d1366b783.tar.gz lite-xl-plugin-manager-b9723c0b1ed0580268aaac058866bc1d1366b783.zip |
Fixed commas.
Diffstat (limited to 'src')
-rw-r--r-- | src/lpm.lua | 12 |
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 |