In previous versions it was possible that the selection got lost, eventually breaking the implementation.
*/
public function getCodeBlockLanguages(): array
{
- return \explode("\n", StringUtil::unifyNewlines(\MESSAGE_PUBLIC_HIGHLIGHTERS));
+ $highlighters = \explode("\n", StringUtil::unifyNewlines(\MESSAGE_PUBLIC_HIGHLIGHTERS));
+ if ($highlighters !== []) {
+ return $highlighters;
+ }
+
+ return [
+ 'c',
+ 'cpp',
+ 'csharp',
+ 'css',
+ 'go',
+ 'html',
+ 'java',
+ 'javascript',
+ 'json',
+ 'php',
+ 'python',
+ 'ruby',
+ 'rust',
+ 'sql',
+ 'typescript',
+ 'xml',
+ 'yaml',
+ ];
}
/**