aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-15 20:25:19 -0700
committerredmatrix <git@macgirvin.com>2016-06-15 20:25:19 -0700
commit1dc35db1fe68514b55ddcc70e60dd06b117f81b7 (patch)
tree59a165d0b89f93f5ced3bc92a32c4a5f17c33fb9 /include/bbcode.php
parent427badcae94fc1f15463c5877110fdd528b63828 (diff)
downloadvolse-hubzilla-1dc35db1fe68514b55ddcc70e60dd06b117f81b7.tar.gz
volse-hubzilla-1dc35db1fe68514b55ddcc70e60dd06b117f81b7.tar.bz2
volse-hubzilla-1dc35db1fe68514b55ddcc70e60dd06b117f81b7.zip
ignore case in language names and add 'js' as an alias for 'javascript'
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 3fc1e2ea4..82fa33527 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -492,9 +492,9 @@ function bb_code($match) {
}
function bb_highlight($match) {
- if(in_array($match[1],['php','css','mysql','sql','abap','diff','html','perl','ruby',
- 'vbscript','avrc','dtd','java','xml','cpp','python','javascript','sh']))
- return text_highlight($match[2],$match[1]);
+ 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']))
+ return text_highlight($match[2],strtolower($match[1]));
}