29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-26 07:13:21 +00:00

[5.1] CodeMirror change alias js to javascript so that highlighting works (#43114)

This commit is contained in:
Octavian Cinciu 2024-05-11 21:22:32 +03:00 committed by GitHub
parent 9838498166
commit 7706b3d95e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,6 +117,7 @@ final class CodeMirrorProvider extends AbstractEditorProvider
'scss' => 'css',
'sass' => 'css',
'less' => 'css',
'js' => 'javascript',
];
$options->mode = !empty($params['syntax']) ? $params['syntax'] : $this->params->get('syntax', 'html');
$options->mode = $modeAlias[$options->mode] ?? $options->mode;