Template:Source code/doc
Appearance
This is a documentation subpage for Template:Source code. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used to display source code files, with syntax highlighting and a filename displayed. An optional caption can also be added.
Usage
[edit source]{{source code |filename= |lang= |line start= |highlight= |caption= |code= }}
Parameters:
filename
- String. The filename displayed at the top of the code block.
lang
- String. The programming language in use.
line start
- Integer. The number at which line numbering should begin.
highlight
- Integer. Highlight the specified line. (Starting from line 1; the
line start
parameter is not used.) caption
- String. An optional caption, explaining the source code file.