cc – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix demo)
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>&lt;code&gt;</tt> tags instead for multiline comments.
* There is an issue with multiline comments in space-triggered code blocks (see below). Use <tt>&lt;code&gt;</tt> tags instead for multiline comments.
* There is also an issue where leaving a blank line would break the code block (even in <tt>&lt;code&gt;</tt> tags - use <tt>&lt;br&gt;</tt> twice instead)}}
* There is also an issue where leaving a blank line would break the code block (even in <tt>&lt;code&gt;</tt> tags - use <tt>&lt;br&gt;</tt> instead)}}
|-
|-
| style="vertical-align: top" |
| style="vertical-align: top" |

Revision as of 00:54, 30 November 2020

Displays a code comment.

Usage

  • There is an issue with multiline comments in space-triggered code blocks (see below). Use <code> tags instead for multiline comments.
  • There is also an issue where leaving a blank line would break the code block (even in <code> tags - use <br> instead)

spaced

/*

test1
test2
test3
*/

spaced + line return

/*

test1
test2
test3
*/

code tag /* test1 test2 test3 */

code tag + line return /* test1 test2

test3 */

{{cc|message}}

  • message: comment to display
Examples
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>&nbsp;{{Trim|{{{1|-no comment defined-}}}}}</span>

See also