codecomment – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Add .code-comment class usage) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
<includeonly><span class="code-comment">{{{1}}}</span></includeonly><noinclude> | <includeonly><span class="code-comment">{{{1|-no comment defined-{{TemplateCase||[[Category:cc 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|cc template usage error]] category on usage error. | ||
= | |example1= <nowiki>{{codecomment}}</nowiki> | ||
|result1= {{codecomment}} | |||
== | |example2= <nowiki>{{codecomment|example comment}}</nowiki> | ||
|result2= {{codecomment|example comment}} | |||
= | |example3= <div style="white-space: pre"><nowiki>{{codecomment|/* | ||
< | example comment | ||
< | <nowiki/>*/}}</nowiki></div> | ||
|result3= <div style="white-space: pre"> | |||
== | {{codecomment|/* | ||
example comment | |||
<nowiki/>*/}} | |||
</div> | |||
</noinclude> | }}</noinclude> |
Revision as of 16:43, 30 June 2022
Displays a colour-coded code comment. See {{cc}} for single-line comments. It also adds the page to the cc template usage error category on usage error.
This template is used on these pages.
Usage
{{codecomment}}
Code | Result |
---|---|
{{codecomment}} | -no comment defined- |
{{codecomment|example comment}} | example comment |
{{codecomment|/*
example comment
<nowiki/>*/}}
|
/* example comment */ |