Difference between revisions of "SyntaxHighlighting"

From BITPlan Wiki
Jump to navigation Jump to search
(pushed from media by wikipush)
 
Line 9: Line 9:
 
|storemode=property
 
|storemode=property
 
}}
 
}}
 +
= Installation =
 +
<source lang='php'>
 +
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
 +
</source>
 
= Example =
 
= Example =
 
<syntaxhighlight lang="python" line='line'>
 
<syntaxhighlight lang="python" line='line'>

Revision as of 18:52, 31 December 2020

Extension

Extension
edit
name  SyntaxHighlight
url  https://www.mediawiki.org/wiki/Extension:SyntaxHighlight
purpose  syntax highlighting of divers languages
since  2007/04/03
wiki  Ceur-wsWiki, Crwiki, OPEN RESEARCH, Rqwiki, Vanilla

Installation

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

Example

1def quick_sort(arr):
2	less = []
3	pivot_list = []
4	more = []
5	if len(arr) <= 1:
6		return arr
7	else:
8		pass
public class Syntax {
}
wf@capri:/var/www/mediawiki/code/extensions/SyntaxHighlight_GeSHi/pygments$ ./pygmentize -V
Pygments version 2.5.2, (c) 2006-2019 by Georg Brandl.