Module:Sandbox/Aidan9382/DiscussionOverview: Difference between revisions

Content deleted Content added
Decode html characters in text for signatures
 
(2 intermediate revisions by the same user not shown)
Line 23:
local final = ""
for _,user in next,users do
if string.match(user,"^%d+%.%d+%.%d+%.%d+$") or string.match(user,"^%x+:[%x:]+$") or string.match(user, "^~%d%d%d%d%-%d%d%d%d%d%-%d%d%d$") then --Lazy but mostly working basic IPv6 regex
final = final .. "[[Special:Contributions/"..user.."|"..user.."]], "
else
Line 77:
identifier = string.gsub(identifier,"_"," ")
if not string.find(identifier,"/") then --Avoid subpage nonsense
mw.log("Found user on reg",reg,"name is",identifier)
usersOnThisLine[string.find(targetText,reg)] = identifier
end
Line 131 ⟶ 130:
assert(type(page)=="string","Invalid or no page provided")
local success_, text = pcallxpcall(function(Transcluder.get,page)
return Transcluder.get(page)
assert(success,text)
end, function(err)
error(debug.traceback())
end)
local sections = getSectionData(text)
Line 182 ⟶ 184:
end
end
mw.logObject(orderedComments)
local firstComment,lastComment