codecomment – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page update)
m (Some wiki formatting)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span style="color: #00F; font-style: italic;">{{{1}}}</span></includeonly><noinclude>__NOTOC__
<includeonly><span class="code-comment">{{{1|-no comment defined-{{TemplateCase||[[Category:codecomment template usage error]]}}}}}</span></includeonly><noinclude>{{Doc/Template
Displays a code comment.
|descr= Displays a colour-coded code comment. See {{Template|cc}} for single-line comments. It also adds the page to the [[:Category:codecomment template usage error|codecomment template usage error]] category on usage error.


== Usage ==
|example1= <nowiki>{{codecomment}}</nowiki>
<nowiki>{{codecomment|// code comment to display}}</nowiki>
|result1= {{codecomment}}


== Result ==
|example2= <nowiki>{{codecomment|example comment}}</nowiki>
{{codecomment|// code comment to display}}
|result2= {{codecomment|example comment}}


== Source ==
|example3= <div style="white-space: pre"><nowiki>{{codecomment|/*
<syntaxhighlight lang="html">
example comment
<span style="color: #00F; font-style: italic;">{{{1}}}</span></syntaxhighlight>
<nowiki/>*/}}</nowiki></div>
 
|result3= <div style="white-space: pre">
== See also ==
{{codecomment|/*
* [[Template://]]
example comment
</noinclude>
<nowiki/>*/}}
</div>
}}</noinclude>

Latest revision as of 17:43, 30 June 2022

Displays a colour-coded code comment. See {{cc}} for single-line comments. It also adds the page to the codecomment template usage error category on usage error.

This template is used on these pages.

Usage

{{codecomment}}


Examples
Code Result
{{codecomment}} -no comment defined-
{{codecomment|example comment}} example comment
{{codecomment|/* example comment <nowiki/>*/}}

/* example comment */