mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-14 18:15:57 +00:00
Add notice about resource loading to highlight()
Co-Authored-By: Timo Tijhof <krinklemail@gmail.com> Change-Id: Ide7ab4b84d1aacad2db8400de9e350a09c80e8c0
This commit is contained in:
parent
772d658f99
commit
cc44c3c7a8
|
@ -173,6 +173,8 @@ class SyntaxHighlight {
|
|||
}
|
||||
|
||||
// Register CSS
|
||||
// TODO: Consider moving to a separate method so that public method
|
||||
// highlight() can be used without needing to know the module name.
|
||||
$parser->getOutput()->addModuleStyles( 'ext.pygments' );
|
||||
|
||||
return $out;
|
||||
|
@ -211,6 +213,9 @@ class SyntaxHighlight {
|
|||
/**
|
||||
* Highlight a code-block using a particular lexer.
|
||||
*
|
||||
* This produces raw HTML (wrapped by Status), the caller is responsible
|
||||
* for making sure the "ext.pygments" module is loaded in the output.
|
||||
*
|
||||
* @param string $code Code to highlight.
|
||||
* @param string|null $lang Language name, or null to use plain markup.
|
||||
* @param array $args Associative array of additional arguments.
|
||||
|
|
Loading…
Reference in a new issue