Jump to content

Template:Unstrip/doc

From Wikipedia, the free encyclopedia

This function processes the content provided by |1= using the mw.text.unstrip function. It extracts the text from any <nowiki>...</nowiki> tags (so the nowiki text will not show as wiki text) and removes any references and other parser tags. It effectively combines {{UnstripNoWiki}} and {{KillMarkers}}.

Templates, parser functions, extension tags, etc. inside the <nowiki>...</nowiki> tags will not be expanded (unless {{Expand wikitext}} is used). Removing a <ref>...</ref> tag may cause "ghost" references (one that's not in text, but still appears in the reference section). See Template:KillMarkers/doc for more information..

Usage

[edit]
{{Unstrip|Some text <nowiki>wikitext</nowiki> and more some text.}}

Examples

[edit]

Without this template: Regular sentence <nowiki>(some ''nowiki-text'' here {{convert|1|km|mi|abbr=on}})</nowiki>.<ref>Hello!</ref> → Regular sentence (some ''nowiki-text'' here {{convert|1|km|mi|abbr=on}}).[1]

With {{Unstrip}}: {{Unstrip|Regular sentence <nowiki>(some ''nowiki-text'' here {{convert|1|km|mi|abbr=on}})</nowiki>.<ref>Hello!</ref>}} → Regular sentence (some nowiki-text here {{convert|1|km|mi|abbr=on}}).

With {{Unstrip}} and {{Expand wikitext}}: {{Expand wikitext|{{Unstrip|Regular sentence <nowiki>(some ''nowiki-text'' here {{convert|1|km|mi|abbr=on}})</nowiki>.<ref>Hello!</ref>}}}} → Regular sentence (some nowiki-text here 1 km (0.62 mi)).

References

[edit]
  1. ^ Hello!
  2. ^ Hello!
  3. ^ Hello!

See also

[edit]