aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-20 13:06:32 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-20 13:06:32 -0400
commitf4d9d34bbce463e09d45dce137c35ed531bc4ba1 (patch)
treea541fb28d557246ff6460287d4c0acb513d6a730 /include/text.php
parente5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7 (diff)
parentcc09f9a7a5f799a0811ba83799c0a3ac6598c476 (diff)
downloadvolse-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.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');
}