Module:Delink: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(make each parse optional) |
(add (opt-in) code for removing strip markers) |
||
Line 138: | Line 138: | ||
local function _delink(args) |
local function _delink(args) |
||
local text = args[1] or "" |
local text = args[1] or "" |
||
if args.stripmarkers == "yes" then |
|||
-- Remove strip markers. Only use this if you know what you are doing! |
|||
-- In most situations this is not a good idea. See [[Help:Strip markers]]. |
|||
text = mw.ustring.gsub(text, "UNIQ.-QINU", "") |
|||
end |
|||
if not (args.comments == "no") then |
if not (args.comments == "no") then |
||
text = mw.ustring.gsub(text, "<!%-%-.-%-%->", "") -- Remove html comments. |
text = mw.ustring.gsub(text, "<!%-%-.-%-%->", "") -- Remove html comments. |