Content deleted Content added
more regex capitalisation stuff (so many) |
temporary user stuff (from mw:Trust and Safety Product/Temporary Accounts#Updates) |
||
(3 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 56:
--Returns a list of users, and if they were considered a "participant" or someone who was just mentioned
local mentions = {}
text = mw.text.decode(text,true)
--Timestamp is %d%d:%d%d, %d%d? %w+ %d%d%d%d %(UTC%)) but we allow some (minor) leniancy for those who just slightly edit their dates (why?) so that it still picks up
local timestampRegex = "((%d%d:%d%d, %d%d? %w+,? %d%d%d%d) %(UTC%))"
Line 76 ⟶ 77:
identifier = string.gsub(identifier,"_"," ")
if not string.find(identifier,"/") then --Avoid subpage nonsense
usersOnThisLine[string.find(targetText,reg)] = identifier
end
Line 130:
assert(type(page)=="string","Invalid or no page provided")
local
return Transcluder.get(page)
end, function(err)
error(debug.traceback())
end)
local sections = getSectionData(text)
Line 181 ⟶ 184:
end
end
local firstComment,lastComment
|