Difference between revisions of "Template:KillMarkers"
Jump to navigation
Jump to search
imported>DePiep |
imported>Pppery (Use Module:Unstrip instead per TfD) |
||
| Line 1: | Line 1: | ||
| − | {{#invoke: | + | {{#invoke:unstrip|killMarkers|{{{1}}}}}<!-- |
--><noinclude>{{documentation}}</noinclude> | --><noinclude>{{documentation}}</noinclude> | ||
Revision as of 23:41, 25 May 2019
{{{1}}}
| This template uses Lua: |
Contents
Usage
Implements mw.text.killmarkers( s ): remove references and other parser tags from the input string s.
- mw:Extension:Scribunto/Lua_reference_manual#mw.text.killMarkers
- See parser tags description mw:Strip_marker.
Note: removing a <ref> tag may cause "ghost" references (not in text, but appearing in reference section). See "with" example below.
Example
Without:
Hello world.<ref>{{cite web|url=https://www.example.com/|title=Example reference A}}</ref>
- → Hello world.[1]
With:
{{KillMarkers|Hello world.<ref>{{cite web|url=https://www.example.com/|title=Example reference B}}</ref>}}
- → Hello world.
Ghost reference created:
{{KillMarkers|Hello world.<ref>(Ghost reference) {{cite web|url=https://www.example.com/|title=Example reference C}}</ref>}}
- → Hello world.
References
- ↑ "Example reference A".
- ↑ "Example reference B".
- ↑ (Ghost reference) "Example reference C".
See also
| The above documentation is transcluded from Template:KillMarkers/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |