Module:Sandbox/Aurelain/Link/doc: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "This module is intended as a supporting muscle for the LinkIcon template. ==clean()== Removes the following words from a text: * <code>Basic </code> * <code>Advanced </code> * <code>Expert </code> * <code>_special</code> * <code>Masterful </code> {{Color|yellow|Input:}} <pre><nowiki> {{#invoke:Sandbox/Aurelain/Link|clean |Lorem,Basic ,Advanced , Expert ,_special,Masterful ,Ipsum }} </nowiki></pre> {{Color|lime|Output:}} {{#invoke:Sandbox/Aurelain..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
==clean()==
==clean()==
Removes the following words from a text:
Removes the following words from a text:
* <code>Basic </code>
* <code>Basic&nbsp;</code>
* <code>Advanced </code>
* <code>Advanced&nbsp;</code>
* <code>Expert </code>
* <code>Expert&nbsp;</code>
* <code>_special</code>
* <code>_special</code>
* <code>Masterful </code>
* <code>Masterful&nbsp;</code>
Afterwords, appends a language code, if provided and necessary.


{{Color|yellow|Input:}} <pre><nowiki>
{{Color|yellow|Input:}} <pre><nowiki>
{{#invoke:Sandbox/Aurelain/Link|clean
{{#invoke:Sandbox/Aurelain/Link|clean
|Lorem,Basic ,Advanced , Expert ,_special,Masterful ,Ipsum
|Lorem,Basic ,Advanced ,Expert ,_special,Masterful ,Ipsum
}}
}}
</nowiki></pre>
</nowiki></pre>
Line 17: Line 18:
{{Color|lime|Output:}}
{{Color|lime|Output:}}
{{#invoke:Sandbox/Aurelain/Link|clean
{{#invoke:Sandbox/Aurelain/Link|clean
|Lorem,Basic ,Advanced , Expert ,_special,Masterful ,Ipsum
|Lorem,Basic ,Advanced ,Expert ,_special,Masterful ,Ipsum
}}
}}

Latest revision as of 17:23, 25 August 2026

This module is intended as a supporting muscle for the LinkIcon template.

clean()

Removes the following words from a text:

  • Basic 
  • Advanced 
  • Expert 
  • _special
  • Masterful 

Afterwords, appends a language code, if provided and necessary.

Input:

{{#invoke:Sandbox/Aurelain/Link|clean
|Lorem,Basic ,Advanced ,Expert ,_special,Masterful ,Ipsum
}}

Output: Lorem,,,,,,Ipsum