MediaWiki REL1_31
|
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 571 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 361 of file SyntaxHighlight.php.
References $options.
|
static |
Hook to provide syntax highlighting for API pretty-printed output.
IContextSource | $context | |
string | $text | |
string | $mime | |
string | $format |
Definition at line 485 of file SyntaxHighlight.php.
References $context, $mime, $out, $output, 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 429 of file SyntaxHighlight.php.
References $options, $out, $output, $wgParser, $wgTextModelsToParse, ExtensionRegistry\getInstance(), Content\getModel(), and SyntaxHighlight\highlight().
|
static |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
ResourceLoader | &$resourceLoader |
Definition at line 517 of file SyntaxHighlight.php.
References $resourceLoader, and ExtensionRegistry\getInstance().
|
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 375 of file SyntaxHighlight.php.
References $lines, $value, and list.
Referenced by SyntaxHighlight\highlight().
|
static |
Backward-compatibility shim for extensions.
Definition at line 560 of file SyntaxHighlight.php.
References $lang, and wfDeprecated().
Referenced by CurlHttpRequest\execute(), and PhpHttpRequest\execute().
|
staticprotected |
Validate a provided input range.
int | $start | |
int | $end |
Definition at line 403 of file SyntaxHighlight.php.