Go to the source code of this file.
|
static | buildHeadItem ( $geshi) |
| Backward-compatibility shim for extensions. More...
|
|
static | getLexer ( $lang) |
| Get the Pygments lexer name for a particular language. More...
|
|
static | makeCacheKey ( $code, $lexer, $options) |
| Construct a cache key for the results of a Pygments invocation. More...
|
|
static | onApiFormatHighlight (IContextSource $context, $text, $mime, $format) |
| Hook to provide syntax highlighting for API pretty-printed output. More...
|
|
static | onContentGetParserOutput (Content $content, Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) |
| Hook into Content::getParserOutput to provide syntax highlighting for script content. More...
|
|
static | onParserFirstCallInit (Parser &$parser) |
| Register parser hook. More...
|
|
static | onResourceLoaderRegisterModules (&$resourceLoader) |
| Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension. More...
|
|
static | parseHighlightLines ( $lineSpec) |
| Take an input specifying a list of lines to highlight, returning a raw list of matching line numbers. More...
|
|
static | parserHook ( $text, $args=[], $parser) |
| Parser hook. More...
|
|
static | prepare ( $text, $lang) |
| Backward-compatibility shim for extensions. More...
|
|
static | validHighlightRange ( $start, $end) |
| Validate a provided input range. More...
|
|
|
static array | $mimeLexers |
| Mapping of MIME-types to lexer names. More...
|
|
return | $status |
|
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap l f html | O |
|
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap l f html syntaxhighlight error pygments invocation failure Failed to invoke | Pygments |
|
$status | value = self::highlight( $code, null, $args )->getValue() |
|
◆ buildHeadItem()
static buildHeadItem |
( |
|
$geshi | ) |
|
|
static |
◆ getLexer()
Get the Pygments lexer name for a particular language.
- Parameters
-
- Returns
- string|null Lexer name, or null if no matching lexer.
Definition at line 326 of file SyntaxHighlight.class.php.
◆ makeCacheKey()
static makeCacheKey |
( |
|
$code, |
|
|
|
$lexer, |
|
|
|
$options |
|
) |
| |
|
staticprivate |
◆ onApiFormatHighlight()
static onApiFormatHighlight |
( |
IContextSource |
$context, |
|
|
|
$text, |
|
|
|
$mime, |
|
|
|
$format |
|
) |
| |
|
static |
◆ onContentGetParserOutput()
◆ onParserFirstCallInit()
static onParserFirstCallInit |
( |
Parser & |
$parser | ) |
|
|
static |
◆ onResourceLoaderRegisterModules()
static onResourceLoaderRegisterModules |
( |
& |
$resourceLoader | ) |
|
|
static |
◆ parseHighlightLines()
static parseHighlightLines |
( |
|
$lineSpec | ) |
|
|
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.
- Parameters
-
- Returns
- int[] Line numbers.
Definition at line 357 of file SyntaxHighlight.class.php.
References $lines, $value, and as.
◆ parserHook()
static parserHook |
( |
|
$text, |
|
|
|
$args = [] , |
|
|
|
$parser |
|
) |
| |
|
static |
Parser hook.
- Parameters
-
string | $text | |
array | $args | |
Parser | $parser | |
- Returns
- string
- Exceptions
-
Definition at line 377 of file SyntaxHighlight.class.php.
◆ prepare()
static prepare |
( |
|
$text, |
|
|
|
$lang |
|
) |
| |
|
static |
◆ validHighlightRange()
static validHighlightRange |
( |
|
$start, |
|
|
|
$end |
|
) |
| |
|
staticprotected |
◆ $mimeLexers
◆ $status
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap l f html O |
◆ Pygments
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap l f html syntaxhighlight error pygments invocation failure Failed to invoke Pygments |
◆ value
array $current The current iterator BatchRowIterator::value = self::highlight( $code, null, $args )->getValue() |
Definition at line 315 of file SyntaxHighlight.class.php.
Referenced by HtmlArmor::__construct(), RecountCategories::__construct(), DependencyWrapper::__construct(), XmlJsCode::__construct(), GlobalDependency::__construct(), MainConfigDependency::__construct(), ConstantDependency::__construct(), JSNode::__construct(), PPNode_Hash_Text::__construct(), PPNode_Hash_Array::__construct(), PPNode_Hash_Attr::__construct(), StatusValue::__toString(), PPNode_Hash_Text::__toString(), PPNode_Hash_Attr::__toString(), SkinFallbackTemplate::execute(), PPNode_Hash_Array::getLength(), CheckLanguageCLI::help(), PPNode_Hash_Array::item(), StatusValue::merge(), Linker::normalizeSubpageLink(), Preprocessor_Hash::preprocessToObj(), ApiUpload::selectUploadModule(), Cookie::set(), StatusValue::setResult(), SqliteInstaller::setupDatabase(), and UserOptions::showUsageAndExit().