|
|
Line 1: |
Line 1: |
| <noinclude>{{Template}}{{DISPLAYTITLE:Template:file}} | | <includeonly><div><div style=" |
| | | background-color: var(--background-color-neutral-subtle); |
| | | line-height: 1.3; |
| == About ==
| | font-family: monospace; |
| Used to display contents of a file.
| | padding: 0.5em 1em; |
| {{META Pipe Character}}
| | border-top-left-radius: 0.3rem; |
| | | border-top-right-radius: 0.3rem; |
| == Usage ==
| | border: 1px solid var(--border-color-muted); |
| | | border-bottom: 0; |
| <nowiki>{{file|filename|language|contents}}</nowiki>
| | margin-bottom: -1em; |
| | | "><span style=" |
| See documentation about <code><syntaxhighlight></code> for supported languages.
| | font-size: 120%; |
| | | color: {{{iconColor|var(--color-base);}}} |
| <nowiki>{{file|main.c|c| | | ">{{unicon|{{{icon|≡}}}}}</span> {{{1}}}</div>{{code|lang={{{2}}}|line={{{line|}}}|copy={{{copy|yes}}}|highlight={{{highlight|}}}|{{{3}}}}}</div></includeonly><noinclude>{{Documentation}}</noinclude> |
| #include <stdio.h>
| |
| | |
| main( )
| |
| {
| |
| printf("hello, world\n");
| |
| }
| |
| }}</nowiki>
| |
| | |
| == Example ==
| |
| {{file|main.c|c|
| |
| #include <stdio.h>
| |
| | |
| main( )
| |
| {
| |
| printf("hello, world\n");
| |
| }
| |
| }}
| |
| | |
| </noinclude><includeonly><div
| |
| style=" | |
| width: 1.2em;
| |
| height: 0;
| |
| position: relative;
| |
| top: 0.8em;
| |
| left: 0.8em;
| |
| " | |
| >{{{icon|[[Image:Breeze-text-x-plain.png|link=]]}}}</div>{{#tag:pre|{{{filename|{{{1|{{META Error}}}}}}}}
| |
| |style=margin-bottom: 0; border-bottom:none; padding-bottom:1.75em; padding-left:2.7em; margin-top: 0;
| |
| }}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}} | |
| |lang={{{lang|{{{2| }}}}}} | |
| |style=margin-top: -1em;}}</includeonly>
| |