aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-18 11:10:40 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-18 11:10:40 +0200
commit178b440f05ff7356f313845fbfb307a838a29f8d (patch)
tree67e8385f1bac27c3d19fb0fd569c88dc266647df /include/text.php
parent9749bbcedcb0aa20330790ca7af838d00de45f05 (diff)
parent755dd67ec7856b8926bfb78e6034ddff1834b032 (diff)
downloadvolse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.tar.gz
volse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.tar.bz2
volse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php6
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');
}