Template:Sandbox: Difference between revisions
imported>Samueldr No edit summary |
imported>Artturin No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{Template}}{{DISPLAYTITLE:Template:file}} | ||
The contents of a file. | |||
{{META Pipe Character}} | |||
== Usage == | |||
{{ | <nowiki>{{file|filename|language|contents}}</nowiki> | ||
See documentation about <code><syntaxhighlight></code> for supported languages. | |||
{{ | <nowiki>{{file|default.nix|nix|<nowiki> | ||
</noinclude><includeonly></includeonly> | {...} | ||
{ | |||
# Comment | |||
} | |||
</nowiki>}}</nowiki> | |||
== Example == | |||
<nowiki>{{file|main.c|c| | |||
#include <stdio.h> | |||
main( ) | |||
{ | |||
printf("hello, world\n"); | |||
} | |||
}}</nowiki> | |||
<hr /> | |||
{{sandbox|main.c|c| | |||
#include <stdio.h> | |||
main( ) | |||
{ | |||
printf("hello, world\n"); | |||
} | |||
}} | |||
<hr /> | |||
</noinclude><includeonly><div | |||
style=" | |||
width: 0; | |||
height: 0; | |||
position: relative; | |||
top: 0.9em; | |||
left: 1em; | |||
" | |||
{{#tag:pre|{{{filename|{{{1|{{META Error}}}}}}}} | |||
|style=margin-bottom: 0; border-bottom:none; padding-bottom:1.6em; padding-left:2.7em; margin-top: 0; | |||
}}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}} | |||
|lang={{{lang|{{{2| }}}}}} | |||
|style=margin-top: -1em;}} | |||
</includeonly> | |||