diff --git a/include/text.php b/include/text.php index 67ce7e65e8..311422c575 100644 --- a/include/text.php +++ b/include/text.php @@ -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 diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 7d1c429765..d545492bb0 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -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])); }