Module:Arguments/doc: Difference between revisions

From Mariopedia, a wiki on Mario, Yoshi, Wario, Donkey Kong, Super Smash Bros., and more!
Jump to navigationJump to search
→‎Custom trimming and blank removal: new section name, copy edit
(→‎Custom trimming and blank removal: new section name, copy edit)
Line 109:
</source>
 
=== Custom trimmingformatting andof blank removalarguments ===
 
Sometimes you want to remove some blank arguments but not others, or perhaps you might want to put all of the positional arguments in lower case. To do things like this you can use the <code>valueFunc</code> option. The input to this option must be a function that takes two parameters, <code>key</code> and <code>value</code>, and returns the value of the argument. This function is called every time an argument is requested from the <code>args</code> table.
 
Example 1: this function preserves whitespace for the first positional argument, but trims all other arguments and removes all other blank arguments.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu