Module:Excerpt: Difference between revisions

Content deleted Content added
Add support for files= to show selected images from the source
Remove trailing line feeds, so "{{Transclude text excerpt|Foo}} other text" flows onto the same line
Line 50:
text = mw.ustring.gsub(text2, "^%s*", "") -- remove initial white space
text = mw.ustring.gsub(text, "\n%[%[File:#DUMMY#%]%]$", "") -- remove dummy image
text = mw.ustring.gsub(text, "\n+$", "") -- remove trailing line feeds, so "{{Transclude text excerpt|Foo}} more" flows on one line
return text
end