mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-18 02:30:50 +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)
|
function pfUI.api.GetCaptures(pat)
|
||||||
local r = capture_cache
|
local r = capture_cache
|
||||||
if not r[pat] then
|
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}
|
r[pat] = { a, b, c, d, e}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user