Template:REVISIONUSER2/doc

From Shadowrun Wiki
Revision as of 18:31, 24 March 2024 by Catrone3 (talk | contribs) (Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page --> The magic word <code><nowiki>{{REVISIONUSER}}</nowiki></code> gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. Usernames starting with '*' or ';' are relatively rare. <code><nowiki>{{REVISIONUSER}}</nowiki></code> may work correctly if it is not in the output bu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

[[Category:Template documentation pages{{#translation:}}]]

The magic word {{REVISIONUSER}} gives poor formatting and fails in wikilinks if the username starts with an asterisk '*' or semicolon ';'. This template is a workaround. Usernames starting with '*' or ';' are relatively rare. {{REVISIONUSER}} may work correctly if it is not in the output but only used in a test during processing.

Usage

Use {{REVISIONUSER2}} instead of {{REVISIONUSER}}

Use {{REVISIONUSER2|pagename}} instead of {{REVISIONUSER:pagename}}

Note the pipe instead of a colon.

Example

Suppose you want to link the last editor of User:Deadfire/Sandbox.

[[User:{{REVISIONUSER2|User:Deadfire/Sandbox}}]] produces:

[[User:]]

Alternative approach

Wrapping {{REVISIONUSER}} with {{#invoke:String2|nowiki|...}} so it looks like {{#invoke:String2|nowiki|{{REVISIONUSER}}}} also works.

See also