MediaWiki
1.29.1
|
Go to the source code of this file.
Functions | |
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 | onRejectParserCacheValue (ParserOutput $parserOutput, $page, ParserOptions $popts) |
Reject parser cache values that are for GeSHi since those ResourceLoader modules no longer exist. More... | |
static | onResourceLoaderRegisterModules (&$resourceLoader) |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension. More... | |
static | onSetup () |
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=array(), $parser) |
Parser hook. More... | |
static | prepare ( $text, $lang) |
Backward-compatibility shim for extensions. More... | |
static | validHighlightRange ( $start, $end) |
Validate a provided input range. More... | |
Variables | |
static array | $mimeLexers |
Mapping of MIME-types to lexer names. More... | |
return | $status |
class SyntaxHighlight_GeSHi startinline highlight highlight hl_lines start start linenostart start nowrap l f html | O |
class SyntaxHighlight_GeSHi 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() |
|
static |
Backward-compatibility shim for extensions.
GeSHi | $geshi |
Definition at line 562 of file SyntaxHighlight_GeSHi.class.php.
References wfDeprecated().
|
staticprivate |
Get the Pygments lexer name for a particular language.
string | $lang | Language name. |
Definition at line 329 of file SyntaxHighlight_GeSHi.class.php.
|
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 333 of file SyntaxHighlight_GeSHi.class.php.
References $options, FormatJson::ALL_OK, FormatJson::encode(), and wfGlobalCacheKey().
|
static |
Hook to provide syntax highlighting for API pretty-printed output.
IContextSource | $context | |
string | $text | |
string | $mime | |
string | $format |
Definition at line 457 of file SyntaxHighlight_GeSHi.class.php.
References $context, $mime, $mimeLexers, $out, $output, $status, and ContextSource::getOutput().
|
static |
Hook into Content::getParserOutput to provide syntax highlighting for script content.
Definition at line 401 of file SyntaxHighlight_GeSHi.class.php.
References $content, $generateHtml, $options, $out, $output, $revId, $status, $title, $wgParser, ContentHandler::getContentText(), ExtensionRegistry::getInstance(), and global.
|
static |
Register parser hook.
$parser | Parser |
Definition at line 363 of file SyntaxHighlight_GeSHi.class.php.
|
static |
Reject parser cache values that are for GeSHi since those ResourceLoader modules no longer exist.
ParserOutput | $parserOutput | |
WikiPage | Article | $page | |
ParserOptions | $popts |
Definition at line 492 of file SyntaxHighlight_GeSHi.class.php.
References $page, $parserOutput, and as.
|
static |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
ResourceLoader | $resourceLoader |
Definition at line 510 of file SyntaxHighlight_GeSHi.class.php.
References $resourceLoader, and ExtensionRegistry::getInstance().
|
static |
Definition at line 314 of file SyntaxHighlight_GeSHi.class.php.
|
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 352 of file SyntaxHighlight_GeSHi.class.php.
References $lines, $value, array(), as, list, and validHighlightRange().
|
static |
Parser hook.
string | $text | |
array | $args | |
Parser | $parser |
MWException |
Definition at line 378 of file SyntaxHighlight_GeSHi.class.php.
|
static |
Backward-compatibility shim for extensions.
Definition at line 551 of file SyntaxHighlight_GeSHi.class.php.
References $lang, and wfDeprecated().
|
staticprotected |
Validate a provided input range.
$start | |
$end |
Definition at line 380 of file SyntaxHighlight_GeSHi.class.php.
Referenced by parseHighlightLines().
|
staticprivate |
Mapping of MIME-types to lexer names.
Definition at line 308 of file SyntaxHighlight_GeSHi.class.php.
Referenced by onApiFormatHighlight().
return $status |
Definition at line 310 of file SyntaxHighlight_GeSHi.class.php.
Referenced by onApiFormatHighlight(), and onContentGetParserOutput().
class SyntaxHighlight_GeSHi startinline highlight highlight hl_lines start start linenostart start nowrap l f html O |
Definition at line 22 of file SyntaxHighlight_GeSHi.class.php.
class SyntaxHighlight_GeSHi startinline highlight highlight hl_lines start start linenostart start nowrap l f html syntaxhighlight error pygments invocation failure Failed to invoke Pygments |
Definition at line 22 of file SyntaxHighlight_GeSHi.class.php.
array $current The current iterator BatchRowIterator::value = self::highlight( $code, null, $args )->getValue() |
Definition at line 309 of file SyntaxHighlight_GeSHi.class.php.
Referenced by HtmlArmor::__construct(), DependencyWrapper::__construct(), GlobalDependency::__construct(), MainConfigDependency::__construct(), ConstantDependency::__construct(), XmlJsCode::__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(), MWExceptionRenderer::googleSearchForm(), CheckLanguageCLI::help(), PPNode_Hash_Array::item(), StatusValue::merge(), Linker::normalizeSubpageLink(), ApiUpload::selectUploadModule(), Cookie::set(), StatusValue::setResult(), SqliteInstaller::setupDatabase(), EditPage::showFormBeforeText(), and UserOptions::showUsageAndExit().