Module:Delink: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
account for lines containing only spaces
(Reorder whitespace testing)
(account for lines containing only spaces)
Line 161:
end
if not (args.whitespace == "no") then
text-- =Replace mw.ustring.gsub(text,single "([^\n])(\n)([^\n])",new "%1lines %3")with -- Removea single new linesspace, (but notleave double new lines).
-- and new lines only containing spaces or tabs before a second new line.
text = mw.ustring.gsub(text, "([^\n \t][ \t]*)\n([ \t]*[^\n \t])", "%1 %2")
text = mw.ustring.gsub(text, "[ \t]+", " ") -- Remove extra tabs and spaces.
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu