MediaWiki master
MediaWiki\Content\CodeHighlightProvider Class Reference

Public Member Functions

 highlight (string $code, CodeHighlighterOptions $options)
 Implements the highlighting of the code based on the given language.
 
 isSupportedLanguage (string $lang)
 Checks if the given language is supported by this code highlighter implementation.
 

Detailed Description

Stability: stable
to extend
Since
1.47

Definition at line 10 of file CodeHighlightProvider.php.

Member Function Documentation

◆ highlight()

MediaWiki\Content\CodeHighlightProvider::highlight ( string $code,
CodeHighlighterOptions $options )
abstract

Implements the highlighting of the code based on the given language.

Parameters
string$code
CodeHighlighterOptions$options
Returns
CodeHighlighterOutput

◆ isSupportedLanguage()

MediaWiki\Content\CodeHighlightProvider::isSupportedLanguage ( string $lang)
abstract

Checks if the given language is supported by this code highlighter implementation.

Parameters
string$lang
Returns
bool

The documentation for this class was generated from the following file: