Template:Syntax highlight/doc

From Valve Developer Community
< Template:Syntax highlight
Revision as of 18:04, 27 June 2023 by Pee (talk | contribs) (documentation)
Jump to navigation Jump to search
Edit-copy.png
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.

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}}


Currently Supported Categories
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

}