cc – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix demo) |
Lou Montana (talk | contribs) m (Fix tip) |
||
Line 22: | Line 22: | ||
{{Important| | {{Important| | ||
* There is an issue with multiline comments in space-triggered code blocks (see below). Use <tt><code></tt> tags instead for multiline comments. | * There is an issue with multiline comments in space-triggered code blocks (see below). Use <tt><code></tt> tags instead for multiline comments. | ||
* There is also an issue where leaving a blank line would break the code block (even in <tt><code></tt> tags - use <tt><br></tt> | * There is also an issue where leaving a blank line would break the code block (even in <tt><code></tt> tags - use <tt><br></tt> instead)}} | ||
|- | |- | ||
| style="vertical-align: top" | | | style="vertical-align: top" | |
Revision as of 00:54, 30 November 2020
Displays a code comment.
Usage
spaced /*
test1 test2 test3 */ |
spaced + line return /*
test1 test2 test3 */ |
code tag
|
code tag + line return
|
{{cc|message}}
- message: comment to display
Code | Result |
---|---|
{{cc}} | // -no comment defined- |
{{cc|this code is wonderful}} | // this code is wonderful |
<code>{{cc|this code is wonderful}}</code> |
/*
this code is wonderful */ |
<code>{{cc| this code is wonderful }}</code> |
/*
this code is wonderful */ |
Source
<span style="color: #00F; font-style: italic"><nowiki>//</nowiki> {{Trim|{{{1|-no comment defined-}}}}}</span>