diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:06:32 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:06:32 -0400 |
commit | f4d9d34bbce463e09d45dce137c35ed531bc4ba1 (patch) | |
tree | a541fb28d557246ff6460287d4c0acb513d6a730 /include/text.php | |
parent | e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7 (diff) | |
parent | cc09f9a7a5f799a0811ba83799c0a3ac6598c476 (diff) | |
download | volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.tar.gz volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.tar.bz2 volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php index 50a3d8892..22f4556a8 100644 --- a/include/text.php +++ b/include/text.php @@ -2887,6 +2887,12 @@ function text_highlight($s,$lang) { if($lang === 'js') $lang = 'javascript'; + if($lang === 'json') { + $lang = 'javascript'; + if(! strpos(trim($s),"\n")) + $s = jindent($s); + } + if(! strpos('Text_Highlighter',get_include_path())) { set_include_path(get_include_path() . PATH_SEPARATOR . 'library/Text_Highlighter'); } |