Template:KillMarkers/doc

< Template:KillMarkers
Revision as of 19:00, 23 July 2023 by Deadfire (talk | contribs) (Template Doc Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage[edit]

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[edit]

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[edit]

  1. "Example reference A".
  2. "Example reference B".
  3. (Ghost reference) "Example reference C".

See also[edit]