mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
api: fix capture index on strings with brackets
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ local capture_cache = {}
|
||||
function pfUI.api.GetCaptures(pat)
|
||||
local r = capture_cache
|
||||
if not r[pat] then
|
||||
for a, b, c, d, e in string.gfind(pat, gsub(pat, "%d%$", "%%(.-)$")) do
|
||||
for a, b, c, d, e in string.gfind(gsub(pat, "%((.+)%)", "%1"), gsub(pat, "%d%$", "%%(.-)$")) do
|
||||
r[pat] = { a, b, c, d, e}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user