Anonymous user
Module:Purge: Difference between revisions
use an informative error message for invalid titles
(add args.page) |
(use an informative error message for invalid titles) |
||
Line 11:
local url
do
local title
if args.page then
title = mw.title.new(args.page)
if not title then
error(string.format(
"'%s' is not a valid page name",
args.page
), 2)
end
else
mw.title.getCurrentTitle()
end
if args.anchor then
title.fragment = args.anchor
|