cc – Template

From Bohemia Interactive Community
Revision as of 19:11, 29 November 2020 by Lou Montana (talk | contribs) (Add partial multiline support)
Jump to navigation Jump to search

Displays a code comment.

This template has an issue with multiline comments in code blocks formatted with space-starting lines (see below). Use <code> tags instead for multiline comments.

spaced

/*

test1
test2
test3
*/

spaced + line return

/*

test1
test2
test3
*/

code tag /* test1 test2 test3 */

code tag + line return /* test1 test2 test3 */

Usage

{{cc|message}}

  • message: comment to display
Examples
Code Result
{{cc}} // -no comment defined-
{{cc|this code is wonderful}} // this code is wonderful
{{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