hl – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Add slash and antislash <wbr> word-breaking tag for mobiles and small monitors + examples) |
Lou Montana (talk | contribs) m (Fix pound sign triggering a list) |
||
Line 1: | Line 1: | ||
<includeonly><var>{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}</var></includeonly><noinclude>{{Doc/Template | <includeonly><var>{{#replace:{{#replace:{{#replace:{{{c|{{{1|-No content provided-{{TemplateCase||[[Category:hl template usage error]]}}}}}}}}|\|<wbr>\}}|/|<wbr>/}}|#|#}}</var> | ||
<!-- | |||
# | |||
<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|<tt>}} 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|<tt>}} 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 18: | Line 22: | ||
|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}} | ||
|example5= <nowiki>{{hl|#test1}}{{hl|#test2}}</nowiki> | |||
|result5= {{hl|#test1}}{{hl|#test2}} | |||
}}</noinclude> | }}</noinclude> |
Revision as of 21:03, 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=
Code | Result |
---|---|
{{hl}} | -No content provided- |
{{hl|"AWARE"}} | "AWARE" |
{{hl|oneLongFilePath |
oneLongFilePath |
{{hl|oneLongFilePath |
oneLongFilePath |
{{hl|#test1}}{{hl|#test2}} | #test1
#test2 |