Template:File: Difference between revisions

Sdht0 (talk | contribs)
Reduce padding
Sdht0 (talk | contribs)
Remove extra line break
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Template}}{{DISPLAYTITLE:Template:file}}
<noinclude>{{Template}}{{DISPLAYTITLE:Template:file}}
The contents of a file.
 
== About ==
Used to display contents of a file.
{{META Pipe Character}}
{{META Pipe Character}}


Line 9: Line 11:
See documentation about <code>&lt;syntaxhighlight></code> for supported languages.
See documentation about <code>&lt;syntaxhighlight></code> for supported languages.


<nowiki>{{file|default.nix|nix|&lt;nowiki>
   <nowiki>{{file|main.c|c|
{...}
{
   # Comment
}
&lt;/nowiki>}}</nowiki>
 
== Example ==
 
<nowiki>{{file|main.c|c|
#include <stdio.h>
#include <stdio.h>


Line 27: Line 20:
}}</nowiki>
}}</nowiki>


<hr />
== Example ==
{{file|main.c|c|
{{file|main.c|c|
#include <stdio.h>
#include <stdio.h>
Line 36: Line 29:
}
}
}}
}}
<hr />


</noinclude><includeonly><div
</noinclude><includeonly><div
Line 50: Line 42:
}}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}}
}}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}}
|lang={{{lang|{{{2| }}}}}}
|lang={{{lang|{{{2| }}}}}}
|style=margin-top: -1em;}}
|style=margin-top: -1em;}}</includeonly>
</includeonly>