hl – Template
| Lou Montana (talk | contribs)  (Fix slash links - remove mobile support for long slash paths (backslash paths still supported)) | Lou Montana (talk | contribs)   (Fix (code refactor)) | ||
| Line 1: | Line 1: | ||
| <includeonly><var>{{#replace:{{#replace:{{# | <includeonly>{{#if:{{{c|{{{1|}}}}}} | ||
| 	| <var>{{#switch:0 | |||
| 		| {{#pos:{{{c|{{{1}}}}}}|:}}= {{#replace:{{{c|{{{1}}}}}}|:|:}} | |||
| 		| {{#pos:{{{c|{{{1}}}}}}|#}}= {{#replace:{{{c|{{{1}}}}}}|#|#}} | |||
| 		| {{#ifexpr: {{#if:{{#pos:{{{c|{{{1}}}}}}|/}}|1|0}} and {{#if:{{#pos:{{{c|{{{1}}}}}}|[<nowiki/>[}}|0|1}}|0}}= WBR SLASH {{#replace:{{{c|{{{1}}}}}}|/|<wbr>/}} | |||
| 		| {{#if:{{#pos:{{{c|{{{1}}}}}}|\}}|0}}= {{#replace:{{{c|{{{1}}}}}}|\|<wbr>\}} | |||
| 		| {{{c|{{{1}}}}}} | |||
| 	}}</var> | |||
| 	| -No content provided-{{TemplateCase||[[Category:hl template usage error]]}} | |||
| }}</includeonly><noinclude><!-- | |||
| -->{{Doc/Template | -->{{Doc/Template | ||
| |descr= This template displays '''h'''igh'''l'''ighted content -  | |descr= This template displays '''h'''igh'''l'''ighted content - it replaces {{hl|<tt>}} which was used across the wiki. It also adds the page to the [[:Category:hl template usage error|hl template usage error]] category on usage error. | ||
| |param1= c | |param1= c | ||
| |descr1= the content to display.<br>If it contains an equal sign {{hl|c= =}}, which '''it should not''' (for inline code, {{hl|<nowiki><syntaxhighlight></nowiki>}}/{{hl|<nowiki><sqf></nowiki>}} should be used instead): | |descr1= the content to display.<br>If it contains an equal sign {{hl|c= =}}, which '''it should not''' (for inline code, {{hl|<nowiki><syntaxhighlight></nowiki>}}/{{hl|<nowiki><sqf></nowiki>}} should be used instead): | ||
| Line 14: | Line 23: | ||
| |example2= <nowiki>{{hl|"AWARE"}}</nowiki> | |example2= <nowiki>{{hl|"AWARE"}}</nowiki> | ||
| |result2= {{hl|"AWARE"}} | |result2= {{hl|"AWARE"}} | ||
| |example3= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>/ThatCannotLineBreak<wbr>/OnMobileOrOtherNonWideScreen<wbr>/BecauseThereAreNoSpaces<wbr>/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>/LetsCoverAllTheCases}<nowiki/>} | |example3= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>/ThatCannotLineBreak<wbr>/OnMobileOrOtherNonWideScreen<wbr>/BecauseThereAreNoSpaces<wbr>/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>/LetsCoverAllTheCases}<nowiki/>} | ||
| |result3= {{hl|oneLongFilePath/ThatCannotLineBreak/OnMobileOrOtherNonWideScreen/BecauseThereAreNoSpaces/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour/LetsCoverAllTheCases}} | |result3= {{hl|oneLongFilePath/ThatCannotLineBreak/OnMobileOrOtherNonWideScreen/BecauseThereAreNoSpaces/AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour/LetsCoverAllTheCases}} | ||
| |example4= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>\ThatCannotLineBreak<wbr>\OnMobileOrOtherNonWideScreen<wbr>\BecauseThereAreNoSpaces<wbr>\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>\LetsCoverAllTheCases}<nowiki/>} | |example4= <nowiki>{{hl|</nowiki>oneLongFilePath<wbr>\ThatCannotLineBreak<wbr>\OnMobileOrOtherNonWideScreen<wbr>\BecauseThereAreNoSpaces<wbr>\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour<wbr>\LetsCoverAllTheCases}<nowiki/>} | ||
| |result4= {{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}} | |result4= {{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}} | ||
| Line 30: | Line 39: | ||
| ; test :{{hl|test}} | ; test :{{hl|test}} | ||
| |example7= <nowiki>* {{hl|[[Template:Link]]}}</nowiki><br><nowiki>* {{hl|[[Template:Link/Internal]]}}</nowiki><br><nowiki>* {{hl|[[Description.ext#CfgSounds]]}}</nowiki><br><nowiki>* {{hl|{{Link|Description.ext#CfgSounds}}}}</nowiki> | |example7= <nowiki>* {{hl|:}}</nowiki><br><nowiki>* {{hl|: test}}</nowiki><br><nowiki>* {{hl|[[Template:Link]]}}</nowiki><br><nowiki>* {{hl|[[Template:Link/Internal]]}}</nowiki><br><nowiki>* {{hl|[[Description.ext#CfgSounds]]}}</nowiki><br><nowiki>* {{hl|{{Link|Description.ext#CfgSounds}}}}</nowiki><br><nowiki>* {{hl|{{GVI|arma3|1.00}}}}</nowiki><br><nowiki>* {{hl|<nowiki>{{GVI|arma3|1.00}}</nowiki>}}</nowiki><br><nowiki>* {{hl|c= <nowiki>{{GVI|arma3|1.00}}</nowiki>}}</nowiki> | ||
| |result7= <nowiki/> | |result7= <nowiki/> | ||
| * {{hl|:}} | |||
| * {{hl|: test}} | |||
| * {{hl|[[Template:Link]]}} | * {{hl|[[Template:Link]]}} | ||
| * {{hl|[[Template:Link/Internal]]}} | * {{hl|[[Template:Link/Internal]]}} | ||
| * {{hl|[[Description.ext#CfgSounds]]}} | * {{hl|[[Description.ext#CfgSounds]]}} | ||
| * {{hl|{{Link|Description.ext#CfgSounds}}}} | * {{hl|{{Link|Description.ext#CfgSounds}}}} | ||
| * {{hl|{{GVI|arma3|1.00}}}} | |||
| * {{hl|<nowiki>{{GVI|arma3|1.00}}</nowiki>}} | |||
| * {{hl|c= <nowiki>{{GVI|arma3|1.00}}</nowiki>}} | |||
| }}</noinclude> | }}</noinclude> | ||
Revision as of 14:18, 16 October 2024
This template displays highlighted content - it replaces <tt> which was used across the wiki. It also adds the page to the hl template usage error category on usage error.
This template is used on these pages.
Usage
{{hl|c}}
- c: the content to display.
 If it contains an equal sign =, which it should not (for inline code, <syntaxhighlight>/<sqf> should be used instead):- replace it with {{=}}
- use c=
- use the MediaWiki trick 1=
 
| Code | Result | 
|---|---|
| {{hl}} | -No content provided- | 
| {{hl|"AWARE"}} | "AWARE" | 
| {{hl|oneLongFilePath | WBR SLASH oneLongFilePath | 
| {{hl|oneLongFilePath | oneLongFilePath | 
| {{hl|#test1}} test2 {{hl|#test3}} test4 | #test1 test2 #test3 test4 | 
| {{hl|:}} a {{hl|:}} b ; test {{hl|test}} ; test {{hl|:test}} ; test: {{hl|test}} | : a : b 
 | 
| * {{hl|:}} * {{hl|: test}} * {{hl|[[Template:Link]]}} * {{hl|[[Template:Link/Internal]]}} * {{hl|[[Description.ext#CfgSounds]]}} * {{hl|{{Link|Description.ext#CfgSounds}}}} * {{hl|{{GVI|arma3|1.00}}}} * {{hl|<nowiki>{{GVI|arma3|1.00}}</nowiki>}} * {{hl|c= <nowiki>{{GVI|arma3|1.00}}</nowiki>}} | 
 | 
 
	