Module:Testing: Difference between revisions
From RuneTails
Replaced content with "local p = {} function p.getFilename(frame) local url = frame.args[1] or "" return mw.ustring.match(url, ".+/([^/]+)$") or url end return p" Tag: Replaced |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p. | function p.getPath(frame) | ||
local url = frame.args[1] or "" | local url = frame.args[1] or "" | ||
return | return url:gsub("^https?://[^/]+/", "") | ||
end | end | ||
return p | return p | ||
Revision as of 02:05, 13 February 2025
Documentation for this module may be created at Module:Testing/doc
local p = {}
function p.getPath(frame)
local url = frame.args[1] or ""
return url:gsub("^https?://[^/]+/", "")
end
return p