diff options
author | redmatrix <git@macgirvin.com> | 2016-06-17 14:58:03 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-17 14:58:03 -0700 |
commit | 2793086c0d65c24e172f7260129968eb80705018 (patch) | |
tree | 6a5100c1b35bf75caf2d118bf8dc9ad159b2c939 /include/text.php | |
parent | f6d76282549c562120417cbdd111109add4f7672 (diff) | |
download | volse-hubzilla-2793086c0d65c24e172f7260129968eb80705018.tar.gz volse-hubzilla-2793086c0d65c24e172f7260129968eb80705018.tar.bz2 volse-hubzilla-2793086c0d65c24e172f7260129968eb80705018.zip |
1. string update, 2. pretty print json blobs
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'); } |