Anonymous user
Module:Delink: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
make each parse optional
(html comments are probably mostly removed by the parser anyway - testing) |
(make each parse optional) |
||
Line 138:
local function _delink(args)
local text = args[1] or ""
if not (args.comments == "no") then
-- text = mw.ustring.gsub(text, "<!%-%-.-%-%->", "") -- Remove html comments.▼
text =
end
text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs.▼
if not (args.wikilinks == "no") then
text = delinkLinkClass(text, "^%[%[.-%]%]", delinkWikilink) -- De-link wikilinks.
end
if not (args.urls == "no") then
▲ text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs.
end
if not (args.whitespace == "no") then
end
return text
end
|