MediaWiki master
CodeHighlightProvider.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Content;
4
10abstract class CodeHighlightProvider {
11
18 abstract public function isSupportedLanguage( string $lang ): bool;
19
27 abstract public function highlight( string $code, CodeHighlighterOptions $options ): CodeHighlighterOutput;
28}
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.
Value object for code highlighting output.