Add notice about resource loading to highlight()

Co-Authored-By: Timo Tijhof <krinklemail@gmail.com>
Change-Id: Ide7ab4b84d1aacad2db8400de9e350a09c80e8c0
This commit is contained in:
Gergő Tisza 2015-10-12 12:30:01 -07:00 committed by Gergő Tisza
parent 772d658f99
commit cc44c3c7a8

View file

@ -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.