Template:Delink/doc

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

Basic


Full syntax


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 instead of the label, as in  →
 * urls if set to no, n , false , or 0 , URL links (wrapped in single, not paired, square brackets) 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 normalized. The normalization 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 , inline HTML references are removed. 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.

TemplateData
{	"description": "Strip link syntax from wikicode input", "format": "inline", "params": { "1": {			"label": "Input", "description": "The wikitext to strip link syntax from", "type": "unbalanced-wikitext", "required": true },		"wikilinks": { "label": "Wikilink handling", "description": "Modify the wikilink stripping style to output targets rather than labels, or no to strip them at all", "type": "line", "suggestedvalues": [ "target", "no", "n", "false", "0"			],			"default": "yes", "suggested": true },		"urls": { "label": "URL handling", "description": "Disable stripping wikilink syntax from around external links (wrapped in single square brackets rather than a pair at each end)", "type": "boolean", "default": "yes" },		"comments": { "label": "Comment handling", "description": "Disable striping wikilink syntax from around HTML comments (between )", "type": "boolean", "default": "yes" },		"whitespace": { "label": "Normalize whitespace", "description": "Disable whitespace normalization performed by default to template input", "type": "boolean", "default": "yes" },		"refs": { "label": "Strip references", "description": "Activate the stripping of HTML ref tags used for inline citations (experimental)", "example": "yes", "type": "boolean", "default": "no", "autovalue": "yes" }	} }