Template:Delink

From imedwiki
Jump to navigation Jump to search

Script error: No such module "delink".

Template documentation[view] [edit] [history] [purge]

Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).

This template removes links from wikitext. It de-links wikilinks and URL links, removes HTML comments, and normalises whitespace. It handles most wikitext correctly, including category links, the colon trick, the pipe trick (normal and reverse), nested wikilinks, and invalid link characters.

Usage

Basic
{{delink|text}}
All parameters
{{delink
| 1          =
| wikilinks  = no
| urls       = no
| comments   = no
| whitespace = no
| refs       = yes
}}

Parameters

  • 1 - the text to be de-linked.
  • wikilinks
    - if set to "no", "n", "false", or "0", wikilinks are not de-linked.
    - if set to "target", wikilinks are reduced to the target portion of a wikilink ([[<target>|<label>]] → <target>)
  • urls - if set to "no", "n", "false", or "0", URL links are not de-linked.
  • comments - if set to "no", "n", "false", or "0", HTML comments are not removed.
  • whitespace - if set to "no", "n", "false", or "0", whitespace is not normalised. The normalisation makes the whitespace of the resulting text look as if it had been put through the MediaWiki parser. For example, single newlines are converted to a single space, but double newlines are left alone.
  • refs - (experimental) if set to "yes", "y", "true", or "1", removes references. This is not recommended, as only the [1], [2], etc. markers will be removed - the references themselves will still appear at the end of the page. There is no known workaround for this problem as of April 2014.

Examples

Code Output
{{delink|[[Foo]]}} Script error: No such module "delink".
{{delink|[[Foo|Bar]]}} Script error: No such module "delink".
{{delink|[[Foo|Bar]]|wikilinks=target}} Script error: No such module "delink".
{{delink|[[Foo]], [[bar]], and [[baz]].}} Script error: No such module "delink".
{{delink|I visited [https://www.example.com example.com].}} Script error: No such module "delink".
{{delink|Foo}} Script error: No such module "delink".

Non-examples

Code Output
{{delink|https://www.example.com}} Script error: No such module "delink".

See also

This template is based (in parts) on the Template:Delink from the free encyclopedia wikipedia and is licensed under GNU license for free documentation and the Creative Commons Attribution/Share Alike. On wikipedia there is a List of authors accessible. More about importing from wikipedia on page Imedwiki:Importing from wikipedia.