Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
m ws between
m order matches
Line 757:
matchStrip = value:match('^([^<]+)<!--.--->$') -- comment after (sometimes used for notes to editors)
if (matchStrip) then return trim(matchStrip) end
matchStrip = value:match('^{{[Ff]lag ?icon[^}]+}}([^<]+)$') -- flag icon (quite common, although against MOS:ICON)
if (matchStrip) then return trim(matchStrip) end
matchStrip = value:match('^{{[Ff]lag ?icon[^}]+}}%s*{{[Ff]lag ?icon[^}]+}}([^<]+)$') -- 2 flag icons (also more common than one would think)
if (matchStrip) then return trim(matchStrip) end
 
matchStrip = value:match('^{{[Ff]lag ?icon[^}]+}}([^<]+)$') -- flag icon (quite common, although against MOS:ICON)
if (matchStrip) then return trim(matchStrip) end
return value -- if we didn't match anything, abort now