cc – Template

From Bohemia Interactive Community
Revision as of 01:53, 30 November 2020 by Lou Montana (talk | contribs) (Fix demo)
Jump to navigation Jump to search

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