hl – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix pound sign triggering a list)
m (Fix the fix)
Line 1: Line 1:
<includeonly><var>{{#replace:{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}|#|&num;}}</var>
<includeonly><var>{{#replace:{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}|#|&num;}}</var></includeonly><noinclude>{{Doc/Template
<!--
&num;
<var>{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}</var>
--></includeonly><noinclude>{{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 23: Line 19:
|result4= {{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}}
|result4= {{hl|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}}


|example5= <nowiki>{{hl|#test1}}{{hl|#test2}}</nowiki>
|example5= <nowiki>{{hl|#test1}} test2 {{hl|#test3}} test4</nowiki>
|result5= {{hl|#test1}}{{hl|#test2}}
|result5= {{hl|#test1}} test2 {{hl|#test3}} test4
}}</noinclude>
}}</noinclude>

Revision as of 21:08, 12 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|oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases}} oneLongFilePath\ThatCannotLineBreak\OnMobileOrOtherNonWideScreen\BecauseThereAreNoSpaces\AndGivenFirefoxAndChromeBrowsersHaveADifferentBehaviour\LetsCoverAllTheCases
{{hl|#test1}} test2 {{hl|#test3}} test4 #test1 test2 #test3 test4