Template:Syntax highlight/doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Doc/subpage}} This template has subpages used to apply CSS to text to signify it is a certain part of code, such as a comment, type, string, etc. == Usage == {{Code|<nowik...") |
(documentation) |
||
Line 1: | Line 1: | ||
{{Doc/subpage}} | {{Doc/subpage}} | ||
This template has subpages used to apply CSS to text to signify it is a certain | 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 <nowiki><source></nowiki> renders code. | ||
== Usage == | == Usage == | ||
{{Code|<nowiki>{{Syntax Highlight|type}}</nowiki>}} | {{Code|<nowiki>{{Syntax Highlight|type}}</nowiki>}} | ||
{| class="standard-table sortable" style="width:100%" | |||
|+ Currently Supported Categories | |||
! Name | |||
! Example | |||
! Shortcut | |||
! Preview | |||
|- | |||
| Comment ||<nowiki>{{Syntax Highlight/Comment|//comment}}</nowiki> || todo || {{Syntax Highlight/Comment|//comment}} | |||
|- | |||
| Control ||<nowiki>{{Syntax Highlight/Control|if}}</nowiki> || todo || {{Syntax Highlight/Control|if}} | |||
|- | |||
| Preprocessor Macro ||<nowiki>{{Syntax Highlight/Macro|#define}}</nowiki> || todo || {{Syntax Highlight/Macro|#define}} | |||
|- | |||
| Number ||<nowiki>{{Syntax Highlight/Number|3.0f}}</nowiki> || todo || {{Syntax Highlight/Number|3.0f}} | |||
|- | |||
| String/Char ||<nowiki>{{Syntax Highlight/String|"Hello, World!"}}</nowiki> || todo || {{Syntax Highlight/String|"Hello, World!"}} | |||
|- | |||
| Type ||<nowiki>{{Syntax Highlight/Type|unsigned int}}</nowiki> || todo || {{Syntax Highlight/Type|unsigned int}} | |||
} | |||
{{Doc/Sandbox other| | {{Doc/Sandbox other| |
Revision as of 18:04, 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
}
|