Module:Sandbox/Perryprog/xlink

local p = {} local prevDiffStart = "https://en%.wikipedia%.org/w/index%.php%?title=.-&diff=prev&"

function p.xlink(frame) -- https://en.wikipedia.org/w/index.php?title=User_talk:Perryprog&diff=prev&oldid=999347924&diffmode=source -- Should become local match = string.match(frame.args[1], prevDiffStart .. "oldid=(%d+)") return frame:expandTemplate({title = "Diff2", args = {match}}) end

return p