Template:Bc: Difference between revisions

From KDE Community Wiki
(Add bc template)
 
(Add another code templates to list; simplify sections)
 
Line 2: Line 2:
{{Template}}
{{Template}}


Block code without header.
Block code.


* Use [[Template:hc]] for block code with header.
* Use [[Template:hbc]] for block code with header.
* Use [[Template:hbc-hl]] for block code with header and with syntax highlighting.
* Use [[Template:ic]] for inline code.
* Use [[Template:ic]] for inline code.
* Use [[Template:ic-hl]] for inline code with syntax highlighting.


==Usage==
== Usage example ==


{{bc|<nowiki>{{bc|code}}</nowiki>}}
{{bc|<nowiki>{{bc|echo "Hello world"}}</nowiki>}}


==Example==
== Result ==


{{bc|code}}</noinclude><includeonly><pre<noinclude></noinclude>>{{{code|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>></includeonly><noinclude><!-- The &lt;noinclude>&lt;/noinclude> hack is needed to allow wiki markup inside the pre tags; reference: http://www.gossamer-threads.com/lists/wiki/mediawiki/118688#118688 --></noinclude>
{{bc|echo "Hello world"}}</noinclude><includeonly><pre<noinclude></noinclude>>{{{code|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>></includeonly><noinclude><!-- The &lt;noinclude>&lt;/noinclude> hack is needed to allow wiki markup inside the pre tags; reference: http://www.gossamer-threads.com/lists/wiki/mediawiki/118688#118688 --></noinclude>

Latest revision as of 20:06, 29 September 2023

This page is a template, editing it will affect all the pages that make use of it, so users should be especially careful when editing it. For more details on how to use templates see "A Quick Guide to Templates"

Block code.

Usage example

{{bc|echo "Hello world"}}

Result

echo "Hello world"