Template:Syntax highlight/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
|- | |- | ||
| Type ||<nowiki>{{Syntax Highlight/Type|unsigned int}}</nowiki> || todo || {{Syntax Highlight/Type|unsigned int}} | | Type ||<nowiki>{{Syntax Highlight/Type|unsigned int}}</nowiki> || todo || {{Syntax Highlight/Type|unsigned int}} | ||
} | |- | ||
|} | |||
{{Doc/Sandbox other| | {{Doc/Sandbox other| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Templates]] | [[Category:Templates]] | ||
}} | }} |
Revision as of 18:08, 27 June 2023

This is a documentation subpage for Template:Syntax highlight.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template has subpages used to apply CSS to text to signify it is a certain category, such as a comment, type, string, etc. the CSS here is taken from how <source> renders code.
Usage
{{Syntax Highlight|type}}
Name | Example | Shortcut | Preview |
---|---|---|---|
Comment | {{Syntax Highlight/Comment|//comment}} | todo | Template:Syntax Highlight/Comment |
Control | {{Syntax Highlight/Control|if}} | todo | Template:Syntax Highlight/Control |
Preprocessor Macro | {{Syntax Highlight/Macro|#define}} | todo | Template:Syntax Highlight/Macro |
Number | {{Syntax Highlight/Number|3.0f}} | todo | Template:Syntax Highlight/Number |
String/Char | {{Syntax Highlight/String|"Hello, World!"}} | todo | Template:Syntax Highlight/String |
Type | {{Syntax Highlight/Type|unsigned int}} | todo | Template:Syntax Highlight/Type |