hl – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix colon presence - escape the colon!)
(Fix slash links - remove mobile support for long slash paths (backslash paths still supported))
Line 1: Line 1:
<includeonly><var>{{#replace:{{#replace:{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|:|&colon;}}|\|<wbr>\}}|/|<wbr>/}}|#|&num;}}</var></includeonly><noinclude>{{Doc/Template
<includeonly><var>{{#replace:{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|:|&colon;}}|\|<wbr>\}}|#|&num;}}</var></includeonly><noinclude><!--
wbr slash support removed as it broke links (e.g {{hl|[[Template:Link/Internal]]}})
-->{{Doc/Template
|descr= This template displays '''h'''igh'''l'''ighted content - its purpose is to replace {{hl|&lt;tt&gt;}} usage across the wiki. It also adds the page to the [[:Category:hl template usage error|hl template usage error]] category on usage error.
|descr= This template displays '''h'''igh'''l'''ighted content - its purpose is to replace {{hl|&lt;tt&gt;}} usage 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
Line 12: Line 14:
|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 22: Line 24:
|result5= {{hl|#test1}} test2 {{hl|#test3}} test4
|result5= {{hl|#test1}} test2 {{hl|#test3}} test4


|example6= <nowiki>{{hl|:}}</nowiki><br><nowiki>a {{hl|:}} b</nowiki>
|example6= <nowiki>{{hl|:}}</nowiki><br><nowiki>a {{hl|:}} b</nowiki><br><nowiki>; test {{hl|test}}</nowiki><br><nowiki>; test {{hl|:test}}</nowiki><br><nowiki>; test: {{hl|test}}</nowiki>
|result6= {{hl|:}}<br>a {{hl|:}} b
|result6= {{hl|:}}<br>a {{hl|:}} b
; test {{hl|test}}
; 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>
|result7= <nowiki/>
* {{hl|[[Template:Link]]}}
* {{hl|[[Template:Link/Internal]]}}
* {{hl|[[Description.ext#CfgSounds]]}}
* {{hl|{{Link|Description.ext#CfgSounds}}}}
}}</noinclude>
}}</noinclude>

Revision as of 12:29, 16 October 2024

This template displays highlighted content - its purpose is to replace <tt> usage 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, / should be used instead):
    • replace it with
    • use c=
    • use the MediaWiki trick 1=
Examples
Code Result
{{hl}} -No content provided-
{{hl|"AWARE"}} "AWARE"
{{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}} oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases
{{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
test test
test :test
test
test
* {{hl|[[Template:Link]]}}
* {{hl|[[Template:Link/Internal]]}}
* {{hl|[[Description.ext#CfgSounds]]}}
* {{hl|{{Link|Description.ext#CfgSounds}}}}