Anonimo

Modulo:Sandbox/Lucamauri/modulotest: differenze tra le versioni

Da Wikitrek.
nessun oggetto della modifica
Nessun oggetto della modifica
Nessun oggetto della modifica
 
Riga 20: Riga 20:
end
end
return p
return p
]]--
]]--


Riga 32: Riga 38:
if not text then return end
if not text then return end
text = mw.text.killMarkers(text)
text = mw.text.killMarkers(text)
:gsub('<span class="nowrap">(.+)</span>', '%1') --remove nowrap while keeping text inside
 
:gsub('<br ?/?>', ', ') --replace br with commas
 
:gsub('<(.-)>', '') --strip out tags
:gsub('%[%[%s*[Ff]ile%s*:.-%]%]', '') --strip out files
:gsub('%[%[%s*[Ii]mage%s*:.-%]%]', '') --strip out use of image:
:gsub('%[%[%s*[Cc]ategory%s*:.-%]%]', '') --strip out categories
:gsub('%[%[[^%]]-|', '') --strip out piped link text
:gsub('[%[%]]', '') --then strip out remaining [ and ]
:gsub("'''''", "") --strip out bold italic markup
:gsub("'''?", "") --not stripping out '''' gives correct output for bolded text in quotes
return text
return text
end
end


return p
return p