Module:Clean image/doc
This is the documentation page for Module:Clean image
Module:Clean image's function main is invoked by Template:Clean image.
Module:Clean image requires Module:Paramtest.
Cleans an input image to prevent double linking.
This module is a helper module to be used by other modules; it may not designed to be invoked directly. See Brighter Shores:Lua/Helper modules for a full list and more information.
Function | Type | Use |
---|---|---|
clean{ file = [string|'no'], width = [string|nil], height = [string|nil], link = [string|nil], align = [string|nil] } | table | Used to clean up user input; extracts only the file name of the input and returns its own formatted link.
Input is a table with fields:
|
Example:
local cleanImage = require( 'Module:Clean image' ).clean
mw.log( cleanImage{ file = '[[File:Basic bacon.png|link=Basic bacon|200px]]' } ) --> '[[File:Basic bacon.png|frameless]]'