Module:Addlink/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
(no longer relevant) |
||
Line 19: | Line 19: | ||
:{{#invoke:InfoboxLink|wrapInLink|[[Foo|Bar]]}} |
:{{#invoke:InfoboxLink|wrapInLink|[[Foo|Bar]]}} |
||
==Issues== |
|||
The module is best used in a template, as it will not work if there is whitespace in the parameters. |
|||
:<code><nowiki>{{#invoke:InfoboxLink|wrapInLink| [[Foo]] }}</nowiki></code> |
|||
Produces: |
|||
:{{#invoke:InfoboxLink|wrapInLink| [[Foo]] }} |
|||
<includeonly>[[Category:Modules for general use]]</includeonly><noinclude>[[Category:Module documentation]]</noinclude> |
<includeonly>[[Category:Modules for general use]]</includeonly><noinclude>[[Category:Module documentation]]</noinclude> |
Revision as of 17:25, 30 April 2019
This module sanitizies link input. It will add [[ ]]
around text given to it, but will ignore it if it sees that square brackets are already present.
Examples
{{#invoke:InfoboxLink|wrapInLink|[[Foo]]}}
{{#invoke:InfoboxLink|wrapInLink|Foo}}
Both produce the following output:
- Script error: No such module "InfoboxLink".
Piped links also work.
{{#invoke:InfoboxLink|wrapInLink|[[Foo|Bar]]}}
{{#invoke:InfoboxLink|wrapInLink|Foo{{!}}Bar}}
Both produce:
- Script error: No such module "InfoboxLink".