සැකිල්ල:Delink/උපදෙස්
![]() |
මෙය "සැකිල්ල:Delink" සඳහා උපදෙස් උප පිටුවක් වේ (සැකිල්ල සඳහා එම පිටුව වෙතට යොමු වන්න). මෙහි ඇත්තේ භාවිත තොරතුරු, ප්රවර්ග, සහ මූලික සැකිල්ල පිටුවට අදාළ නොවන වෙනත් අන්තර්ගතය වේ. |
![]() | මෙම සැකිල්ල Lua භාවිතා කරයි: |
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
සංස්කරණය{{Delink|text}}
Full syntax
සංස්කරණය{{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 instead of the label, as in
[[<target>|<label>]]
→<target>
|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.
Examples
සංස්කරණයWikitext markup | Renders as |
---|---|
{{Delink|[[Foo]]}}
|
Foo |
{{Delink|[[Foo|Bar]]}}
|
Bar |
{{Delink|[[Foo|Bar]]}}
|
Foo |
{{Delink|[[Foo]], [[bar]], and [[baz]].}}
|
Foo, bar, and baz. |
{{Delink|I visited [https://www.example.com example.com].}}
|
I visited example.com. |
Errant use
සංස්කරණයWikitext markup | Renders as |
---|---|
{{Delink|Foo}}
|
Foo |
{{Delink|https://www.example.com}}
|
https://www.example.com |
TemplateData
සංස්කරණයStrip link syntax from wikicode input
Parameter | Description | Type | Status | |
---|---|---|---|---|
Input | 1 | The wikitext to strip link syntax from | Unbalanced wikitext | required |
Wikilink handling | wikilinks | Modify the wikilink stripping style to output targets rather than labels, or no to strip them at all
| Line | suggested |
URL handling | urls | Disable stripping wikilink syntax from around external links (wrapped in single square brackets rather than a pair at each end)
| Boolean | optional |
Comment handling | comments | Disable striping wikilink syntax from around HTML comments (between <!-- and -->)
| Boolean | optional |
Normalize whitespace | whitespace | Disable whitespace normalization performed by default to template input
| Boolean | optional |
Strip references | refs | Activate the stripping of HTML ref tags used for inline citations (experimental)
| Boolean | optional |