local snapshotV = tonumber(extras.PackageVersion())
local snapshotV = tonumber(extras.PackageVersion())
require 'tprint'
dofile(GetInfo(60) .. "aardwolf_colors.lua")
local prefix = GetAlphaOption("script_prefix")
local prefix = GetAlphaOption("script_prefix")
@ -89,17 +88,27 @@ function startNoteList(name, line, wildcards)
end
end
function findBoundaries(tbl)
function findBoundaries(tbl)
local startIdx = 1
local foundStart = false
local endIdx = #tbl
local tildeStr = string.rep("~", 79)
while startIdx<= endIdx and not tbl[startIdx][1].text:find("~") and not tbl[strtIdx][1].text:find("No more new") do
for i,v in ipairs(tbl) do
table.remove(tbl, startIdx)
startIdx = startIdx + 1
if v[1].text == tildeStr or v[1].text:find("No more new") then
foundStart = true
break
else
table.remove(tbl, i)
end
end
end
while endIdx >= 1 and not tbl[endIdx][1].text:find("~") and not tbl[endIdx][1].text:find("There are no") and not tbl[endIdx][1].text:find("Changed to") do
if foundStart then
table.remove(tbl, endIdx)
for i = #tbl, 1, -1 do
endIdx = endIdx -1
if tbl[i][1].text == tildeStr or tbl[i][1].text:find("There are no") or tbl[i][1].text:find("Changed") then