mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-14 18:15:57 +00:00
Expose Pygments version on Special:Version
Change-Id: Ia4eccc4f16873b16e106c8196d7582ca5b27b365
This commit is contained in:
parent
af6654e5f9
commit
b8a5dd08ee
|
@ -101,7 +101,8 @@
|
|||
],
|
||||
"ApiFormatHighlight": [
|
||||
"SyntaxHighlight::onApiFormatHighlight"
|
||||
]
|
||||
],
|
||||
"SoftwareInfo": "SyntaxHighlight::onSoftwareInfo"
|
||||
},
|
||||
"attributes": {
|
||||
"SyntaxHighlight": {
|
||||
|
|
|
@ -558,4 +558,18 @@ class SyntaxHighlight {
|
|||
// Inform MediaWiki that we have parsed this page and it shouldn't mess with it.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook to add Pygments version to Special:Version
|
||||
*
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/SoftwareInfo
|
||||
* @param array &$software
|
||||
*/
|
||||
public static function onSoftwareInfo( array &$software ) {
|
||||
try {
|
||||
$software['[https://pygments.org/ Pygments]'] = Pygmentize::getVersion();
|
||||
} catch ( PygmentsException $e ) {
|
||||
// pass
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue