Add bash to text_highlight language list

This commit is contained in:
Hypolite Petovan 2018-03-29 19:29:09 -04:00
parent 8a2d41e53f
commit 586b0b6e57
2 changed files with 5 additions and 1 deletions

View file

@ -2030,6 +2030,10 @@ function text_highlight($s, $lang) {
$lang = 'javascript';
}
if ($lang === 'bash') {
$lang = 'sh';
}
// @TODO: Replace Text_Highlighter_Renderer_Html by scrivo/highlight.php
// Autoload the library to make constants available

View file

@ -1294,7 +1294,7 @@ class BBCode extends BaseObject
{
if (in_array(strtolower($match[1]),
['php', 'css', 'mysql', 'sql', 'abap', 'diff', 'html', 'perl', 'ruby',
'vbscript', 'avrc', 'dtd', 'java', 'xml', 'cpp', 'python', 'javascript', 'js', 'sh'])
'vbscript', 'avrc', 'dtd', 'java', 'xml', 'cpp', 'python', 'javascript', 'js', 'sh', 'bash'])
) {
return text_highlight($match[2], strtolower($match[1]));
}