Module:Clean image/doc
Jump to navigation
Jump to search
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.
Module:Clean image is required by .
Cleans an input image to prevent double linking.
This module is a helper module to be used by other modules; it may not be designed to be invoked directly. See RuneScape: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:Rune dagger.png|link=Rune dagger|200px]]' } ) --> '[[File:Rune dagger.png|frameless]]'