MediaWiki REL1_34
|
Go to the source code of this file.
Classes | |
class | SyntaxHighlight |
Functions | |
static | buildHeadItem ( $geshi) |
Backward-compatibility shim for extensions. | |
static | makeCacheKeyHash ( $code, $lexer, $options) |
Construct a cache key for the results of a Pygments invocation. | |
static | onApiFormatHighlight (IContextSource $context, $text, $mime, $format) |
Hook to provide syntax highlighting for API pretty-printed output. | |
static | onContentGetParserOutput (Content $content, Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) |
Hook into Content::getParserOutput to provide syntax highlighting for script content. | |
static | onResourceLoaderRegisterModules (&$resourceLoader) |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension. | |
static | parseHighlightLines ( $lineSpec) |
Take an input specifying a list of lines to highlight, returning a raw list of matching line numbers. | |
static | prepare ( $text, $lang) |
Backward-compatibility shim for extensions. | |
static | validHighlightRange ( $start, $end) |
Validate a provided input range. | |
|
static |
Backward-compatibility shim for extensions.
GeSHi | $geshi |
Definition at line 572 of file SyntaxHighlight.php.
References wfDeprecated().
|
staticprivate |
Construct a cache key for the results of a Pygments invocation.
string | $code | Code to be highlighted. |
string | $lexer | Lexer name. |
array | $options | Options array. |
Definition at line 358 of file SyntaxHighlight.php.
|
static |
Hook to provide syntax highlighting for API pretty-printed output.
IContextSource | $context | |
string | $text | |
string | $mime | |
string | $format |
Definition at line 482 of file SyntaxHighlight.php.
References $context, and SyntaxHighlight\highlight().
|
static |
Hook into Content::getParserOutput to provide syntax highlighting for script content.
Content | $content | |
Title | $title | |
int | $revId | |
ParserOptions | $options | |
bool | $generateHtml | |
ParserOutput | &$output |
Definition at line 426 of file SyntaxHighlight.php.
References $content, $title, $wgParser, $wgTextModelsToParse, ParserOutput\addModuleStyles(), SyntaxHighlight\highlight(), and ParserOutput\setText().
|
static |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
ResourceLoader | &$resourceLoader |
Definition at line 514 of file SyntaxHighlight.php.
References $resourceLoader.
|
staticprotected |
Take an input specifying a list of lines to highlight, returning a raw list of matching line numbers.
Input is comma-separated list of lines or line ranges.
string | $lineSpec |
Definition at line 372 of file SyntaxHighlight.php.
References $lines.
Referenced by SyntaxHighlight\highlight().
|
static |
Backward-compatibility shim for extensions.
Definition at line 561 of file SyntaxHighlight.php.
References $lang, and wfDeprecated().
Referenced by CurlHttpRequest\execute(), GuzzleHttpRequest\execute(), and PhpHttpRequest\execute().
|
staticprotected |
Validate a provided input range.
int | $start | |
int | $end |
Definition at line 400 of file SyntaxHighlight.php.