MediaWiki
1.33.0
|
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 | makeCacheKeyHash ( $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... | |
Variables | |
static array | $mimeLexers |
Mapping of MIME-types to lexer names. More... | |
$output = self::plainCodeWrap( $code, $inline ) | |
return | $status |
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap highlight l f html | O |
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap highlight l f html syntaxhighlight error pygments invocation failure Failed to invoke | Pygments |
if( $inline) $status | value = $output |
|
static |
Backward-compatibility shim for extensions.
GeSHi | $geshi |
Definition at line 571 of file SyntaxHighlight.php.
References wfDeprecated().
|
staticprivate |
Get the Pygments lexer name for a particular language.
string | $lang | Language name. |
Definition at line 341 of file SyntaxHighlight.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 357 of file SyntaxHighlight.php.
References $options, FormatJson\ALL_OK, and FormatJson\encode().
|
static |
Hook to provide syntax highlighting for API pretty-printed output.
IContextSource | $context | |
string | $text | |
string | $mime | |
string | $format |
Definition at line 481 of file SyntaxHighlight.php.
References $context, $mimeLexers, $out, and $output.
|
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 425 of file SyntaxHighlight.php.
References $content, $options, $out, $output, $title, $wgParser, $wgTextModelsToParse, ContentHandler\getContentText(), and ExtensionRegistry\getInstance().
|
static |
|
static |
Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
ResourceLoader | &$resourceLoader |
Definition at line 513 of file SyntaxHighlight.php.
References $resourceLoader, class, 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 371 of file SyntaxHighlight.php.
|
static |
Parser hook.
string | $text | |
array | $args | |
Parser | $parser |
MWException |
Definition at line 392 of file SyntaxHighlight.php.
|
static |
Backward-compatibility shim for extensions.
Definition at line 560 of file SyntaxHighlight.php.
References $lang, and wfDeprecated().
Referenced by GuzzleHttpRequest\prepare().
|
staticprotected |
Validate a provided input range.
int | $start | |
int | $end |
Definition at line 399 of file SyntaxHighlight.php.
|
staticprivate |
Mapping of MIME-types to lexer names.
Definition at line 329 of file SyntaxHighlight.php.
Referenced by onApiFormatHighlight().
$output = self::plainCodeWrap( $code, $inline ) |
Definition at line 334 of file SyntaxHighlight.php.
Referenced by Maintenance\activateProfiler(), DifferenceEngineSlotDiffRenderer\addModules(), ProtectionForm\buildForm(), WikiExporter\closeStream(), StringUtils\delimiterReplaceCallback(), MediaWiki\Storage\DerivedPageDataUpdater\doParserCacheUpdate(), LinkHolderArray\doVariants(), CodeEditorHooks\editPageShowEditFormInitial(), SpecialRenameuser\execute(), SpecialContributions\execute(), UpdateLexerList\execute(), SpecialExpandTemplates\execute(), CategoryTreePage\execute(), SpecialWatchlist\execute(), SpecialEditTags\execute(), CategoryChangesAsRdf\execute(), SpecialRevisionDelete\execute(), DumpCategoriesAsRdf\execute(), BlockLevelPass\execute(), SpecialPageExecutor\executeSpecialPage(), GadgetDefinitionContent\fillParserOutput(), JsonContent\fillParserOutput(), DummyNonTextContent\fillParserOutput(), DummyContentForTesting\fillParserOutput(), TextContent\fillParserOutput(), WikitextContent\fillParserOutput(), ExecutableFinder\findExecutable(), WikiExporter\finishPageStreamOutput(), MediaWiki\Logger\Monolog\LineFormatter\format(), AutoloadGenerator\generatePHPAutoload(), CategoryMembershipChangeJob\getCategoriesAtRev(), TextContentHandler\getDataForSearchIndex(), ContentHandler\getDataForSearchIndex(), ArticleViewTest\getHtml(), SpecialPageExecutor\getHTMLFromSpecialPage(), ChangesListBooleanFilter\getJsData(), ChangesListStringOptionsFilterGroup\getJsData(), ChangesListFilterGroup\getJsData(), ChangesListFilter\getJsData(), WebInstallerLanguage\getLanguageSelector(), EditPage\getPreviewLimitReport(), Revision\RenderedRevision\getRevisionParserOutput(), MediaWiki\Storage\DerivedPageDataUpdater\getSecondaryDataUpdates(), Revision\RenderedRevision\getSlotParserOutput(), ChangesListSpecialPage\getStructuredFilterJsData(), CategoryChangesAsRdf\handleAdds(), CategoryChangesAsRdf\handleDeletes(), CategoryChangesAsRdf\handleEdits(), CategoryChangesAsRdf\handleMoves(), PageDataRequestHandler\handleRequest(), CategoryChangesAsRdf\handleRestores(), DumpRenderer\handleRevision(), CryptHKDF\HKDFExpand(), PageDataRequestHandler\httpContentNegotiation(), StringUtils\hungryDelimiterReplace(), Profiler\logData(), Profiler\logDataPageOutputOnly(), MediaWiki\main(), SpecialExpandTemplates\makeOutput(), PageDataRequestHandlerTest\makeOutputPage(), Maintenance\maybeHelp(), mccGetHelp(), onApiFormatHighlight(), onContentGetParserOutput(), InputBoxHooks\onMediaWikiPerformAction(), SpamBlacklistHooks\onParserOutputStashForEdit(), SpamBlacklistHooks\onUploadVerifyUpload(), ImagePage\openShowImage(), WikiExporter\openStream(), SpecialWatchlist\outputChangesList(), WikiExporter\outputLogStream(), WikiExporter\outputPageStreamBatch(), InfoAction\pageInfo(), MediaWiki\performAction(), MediaWiki\performRequest(), Wikimedia\Rdbms\DatabasePostgres\pg_array_parse(), MediaWiki\preOutputCommit(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), Revision\RenderedRevision\pruneRevisionSensitiveOutput(), ParserTestPrinter\quickDiff(), SectionProfiler\remapCallTree(), ImageMap\render(), LinkHolderArray\replaceInternal(), LinkHolderArray\replaceInterwiki(), UserNotLoggedIn\report(), Revision\RenderedRevision\setRevisionParserOutput(), SpecialAllPages\showChunk(), SpecialGadgets\showExportForm(), UserrightsPage\showLogFragment(), SpecialGadgets\showMainForm(), SpecialPrefixindex\showPrefixChunk(), SpecialEditWatchlist\showTitles(), DifferenceEngineSlotDiffRendererTest\testAddModules(), ArticleViewTest\testArticleAfterFetchContentObjectHook(), ArticleViewTest\testArticleContentViewCustomHook(), ArticleViewTest\testArticleRevisionViewCustomHook(), ArticleViewTest\testArticleViewHeaderHook(), FirejailCommandTest\testBuildFinalCommand(), DatabaseMysqlBaseTest\testBuildIntegerCast(), DatabaseSQLTest\testBuildIntegerCast(), DatabaseOracleTest\testBuildSubstring(), DatabaseMssqlTest\testBuildSubstring(), DatabaseSqliteRdbmsTest\testBuildSubstring(), DatabaseSQLTest\testBuildSubstring(), ListToggleTest\testConstruct(), ContentHandlerTest\testDataIndexFields(), SpecialPageDataTest\testExecute(), ArrayDiffFormatterTest\testFormat(), FormatMetadataTest\testGetFormattedData(), ListToggleTest\testGetHTML(), MediaWiki\Tests\Revision\RevisionRendererTest\testGetRenderedRevision_known(), MediaWiki\Tests\Revision\RevisionRendererTest\testGetRenderedRevision_noHtml(), BaseBlacklistTest\testGetTypeFromTitle(), PageDataRequestHandlerTest\testHandleRequest(), PageDataRequestHandlerTest\testHttpContentNegotiation(), WfTimestampTest\testHttpDate(), PoolWorkArticleViewTest\testMagicWords(), MediaWiki\Tests\Storage\PageUpdaterTest\testMagicWords(), MediaWiki\Tests\Revision\SlotRecordTest\testNewWithSuppressedContent(), MediaWiki\Tests\Revision\RenderedRevisionTest\testNoHtml(), WfTimestampTest\testNormalTimestamps(), WfTimestampTest\testOldTimestamps(), ExtraParserTest\testParseLinkParameter(), PreprocessorTest\testPreprocessorOutputFiles(), LocalisationUpdate\UpdaterTest\testReadMessages(), FormatMetadataTest\testResolveMultivalueValue(), MediaWiki\Tests\Revision\RenderedRevisionTest\testSetRevisionParserOutput(), ArticleViewTest\testShowMissingArticleHook(), CategoryChangesAsRdfTest\testSparqlUpdate(), SpecialPageDataTest\testSpecialPageWithoutParameters(), WfShellExecTest\testT69870(), CommandTest\testT69870(), ApiResultTest\testTransformations(), ArticleViewTest\testUnhiddenViewOfDeletedRevision(), AbstractChangesListSpecialPageTestCase\testValidateOptions(), ArticleViewTest\testView(), ArticleViewTest\testViewCached(), ArticleViewTest\testViewDeletedPage(), ArticleViewTest\testViewMessagePage(), ArticleViewTest\testViewMissingPage(), ArticleViewTest\testViewMissingUserPage(), ArticleViewTest\testViewNonText(), ArticleViewTest\testViewOfCurrentRevision(), ArticleViewTest\testViewOfDeletedRevision(), ArticleViewTest\testViewOfMissingRevision(), ArticleViewTest\testViewOfOldRevision(), ArticleViewTest\testViewRedirect(), ArticleViewTest\testViewUserPageOfNonexistingUser(), WfAssembleUrlTest\testWfAssembleUrl(), WfShorthandToIntegerTest\testWfShorthandToInteger(), TraditionalImageGallery\toHTML(), MediaWiki\tryNormaliseRedirect(), wfArrayInsertAfter(), wfRemoveDotSegments(), and GenerateJqueryMsgData\writeJavascriptFile().
return $status |
Definition at line 346 of file SyntaxHighlight.php.
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap highlight l f html O |
Definition at line 21 of file SyntaxHighlight.php.
class SyntaxHighlight startinline highlight highlight hl_lines start start linenostart start nowrap highlight l f html syntaxhighlight error pygments invocation failure Failed to invoke Pygments |
Definition at line 21 of file SyntaxHighlight.php.
array $current The current iterator BatchRowIterator::value = $output |
Definition at line 345 of file SyntaxHighlight.php.
Referenced by ConstantDependency\__construct(), GlobalDependency\__construct(), MainConfigDependency\__construct(), HtmlArmor\__construct(), RecountCategories\__construct(), DependencyWrapper\__construct(), XmlJsCode\__construct(), MediaWiki\Block\Restriction\AbstractRestriction\__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(), MediaWiki\Block\Restriction\PageRestriction\getTitle(), CheckLanguageCLI\help(), PPNode_Hash_Array\item(), StatusValue\merge(), Linker\normalizeSubpageLink(), Preprocessor_Hash\preprocessToObj(), ApiUpload\selectUploadModule(), Cookie\set(), StatusValue\setResult(), and SqliteInstaller\setupDatabase().