Gamepedia Help Wiki
Advertisement

SyntaxHighlight, formerly known as SyntaxHighlight_GeSHi, is an extension that adds syntax highlighting based on the Pygments syntax highlighting library.

Usage

<syntaxhighlight>
code here
</syntaxhighlight>

Parameters

lang= 
The code's language to determine the highlighting algorithm. For a full list of supported languages, see the Pygments documentation.
line 
Enables line numbers.
start= 
Starting number for the line numbers, if line is enabled.
highlight= 
Comma-separated list of lines to add background highlighting.
inline 
Display the code block inline with surrounding text.
class= 
Adds CSS classes to the code block to allow for additional styling.
style= 
Adds inline CSS styles to the code block.

Examples

lang

<syntaxhighlight lang="css">

Result:

div.skill-table {
    margin: 2.1rem;
    border-collapse:collapse;
}

line

<syntaxhighlight lang="css" line>

Result:

1 div.skill-table {
2     margin: 2.1rem;
3     border-collapse:collapse;
4 }

start

<syntaxhighlight lang="css" line start=5>

Result:

5 div.skill-table {
6     margin: 2.1rem;
7     border-collapse:collapse;
8 }

highlight

<syntaxhighlight lang="css" highlight="1,4">

Result:

div.skill-table {
    margin: 2.1rem;
    border-collapse:collapse;
}

inline

<syntaxhighlight lang="css" inline>

Result: div.skill-table { margin: 2.1rem; border-collapse:collapse; }

See also

Advertisement