Add bash to text_highlight language list
This commit is contained in:
parent
8a2d41e53f
commit
586b0b6e57
2 changed files with 5 additions and 1 deletions
|
@ -2030,6 +2030,10 @@ function text_highlight($s, $lang) {
|
||||||
$lang = 'javascript';
|
$lang = 'javascript';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($lang === 'bash') {
|
||||||
|
$lang = 'sh';
|
||||||
|
}
|
||||||
|
|
||||||
// @TODO: Replace Text_Highlighter_Renderer_Html by scrivo/highlight.php
|
// @TODO: Replace Text_Highlighter_Renderer_Html by scrivo/highlight.php
|
||||||
|
|
||||||
// Autoload the library to make constants available
|
// Autoload the library to make constants available
|
||||||
|
|
|
@ -1294,7 +1294,7 @@ class BBCode extends BaseObject
|
||||||
{
|
{
|
||||||
if (in_array(strtolower($match[1]),
|
if (in_array(strtolower($match[1]),
|
||||||
['php', 'css', 'mysql', 'sql', 'abap', 'diff', 'html', 'perl', 'ruby',
|
['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]));
|
return text_highlight($match[2], strtolower($match[1]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue