From c195bb9fe319b81e2f5854df728f9d5bb8c0444b Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Thu, 27 Aug 2009 16:56:54 +0000 Subject: [PATCH] fixed : spaces to only look outside of "quotes" --- js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php index 066642c9ea..32e79dc17f 100644 --- a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php +++ b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php @@ -170,11 +170,13 @@ function jsonReadable( $json ) { $result .= $char . $newline . str_repeat( $tab, $tabcount ); } break; -/* FIXME: this will change "key" : "message:" to "key" : "messages : ". Not intended. - now "key" : "message" will become "key":"message:", but that's not too big of a problem. - case ':': - $result .= ' ' . $char . ' '; - break; */ + case ':': + if($inquote){ + $result .= $char; + }else{ + $result .= ' ' . $char . ' '; + } + break; case '"': $inquote = !$inquote; $result .= $char; -- 2.20.1