kopia lustrzana https://github.com/friendica/friendica
Add bash to text_highlight language list
rodzic
8a2d41e53f
commit
586b0b6e57
|
@ -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
|
||||
|
|
|
@ -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]));
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue