Module:Delink and Module:Delink/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
m Changed protection settings for "Module:Delink": Dependency of fully-protected (and on WP:CASC) Template:Fix ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) |
Synced (rip one testcase but whatever), dramatically improved efficiency of one of the regex patterns |
||
Line 29: | Line 29: | ||
s = s:match("(.-) ?%(.-%)$") |
s = s:match("(.-) ?%(.-%)$") |
||
elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. |
elseif s:match(",") then -- If there are no brackets, display only the text before the first comma. |
||
s = s:match(" |
s = s:match("[^,]*") |
||
end |
end |
||
return s |
return s |