Template:Format linkr/doc

From "PTTLink Wiki"
< Template:Format linkr
Revision as of 23:08, 20 January 2022 by Kg7qin (talk | contribs) (Created page with "{{Template shortcut|flr}} {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) -->...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

This template does exactly what {{format link}} does, and takes all the same arguments.

This template is intended to lower editor workload when copying links from the URL bar and is not suitable for replacing {{format link}}, because of the changes it makes to {{format link}}'s output that could create ambiguity if automatically replaced.

This template replaces any underscores with spaces and decodes any URL parts in {{format link}}'s output. Some examples of why this may be useful—

{{format link}}

{{format linkr}}

  • {{format linkr|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
People of the Philippines v. Santos, Ressa and Rappler § Santos Jr.'s article
  • {{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
未来日記 § Manga

|nud=

|nud= (no URL decode) can be added to disable URL decoding but still get underscores replaced.

  • {{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61_nga|nud=y}}
%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98 § M%61 nga

Note that you can achieve this through the HTML5 entity &UnderBar; just as well:

  • {{format linkr|pages%5Fcan’t_contain_underscores#but%5Fsections&UnderBar;may (though their anchors won’t!)}}
pages can’t contain underscores § but sections&UnderBar;may (though their anchors won’t!)