diff options
author | redmatrix <git@macgirvin.com> | 2016-06-15 20:25:19 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-15 20:25:19 -0700 |
commit | 1dc35db1fe68514b55ddcc70e60dd06b117f81b7 (patch) | |
tree | 59a165d0b89f93f5ced3bc92a32c4a5f17c33fb9 /include/text.php | |
parent | 427badcae94fc1f15463c5877110fdd528b63828 (diff) | |
download | volse-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/text.php')
-rw-r--r-- | include/text.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php index ec42c650d..59190a9ca 100644 --- a/include/text.php +++ b/include/text.php @@ -2884,9 +2884,11 @@ function flatten_array_recursive($arr) { function text_highlight($s,$lang) { + if($lang === 'js') + $lang = 'javascript'; + if(! strpos('Text_Highlighter',get_include_path())) { set_include_path(get_include_path() . PATH_SEPARATOR . 'library/Text_Highlighter'); - head_add_css('/library/Text_Highlighter/sample.css'); } require_once('library/Text_Highlighter/Text/Highlighter.php'); require_once('library/Text_Highlighter/Text/Highlighter/Renderer/Html.php'); |