Merge pull request #602 from snamor/patch-1

Add the commas to the prettified JSON
This commit is contained in:
William Durand 2015-04-14 17:21:49 +02:00
commit ad70ff96fa

View File

@ -319,7 +319,7 @@
prettifiedJsonString = prettifiedJsonString.replace(/(\{|\[)\n/g, function(match, sectionOpenCharacter) { prettifiedJsonString = prettifiedJsonString.replace(/(\{|\[)\n/g, function(match, sectionOpenCharacter) {
return getJsonCollapseHtml(sectionOpenCharacter) + '<span class="json-collapse-content">\n'; return getJsonCollapseHtml(sectionOpenCharacter) + '<span class="json-collapse-content">\n';
}); });
return prettifiedJsonString.replace(/([^\[][\}\]]),?\n/g, '$1</span>\n'); return prettifiedJsonString.replace(/([^\[][\}\]],?)\n/g, '$1</span>\n');
}; };
var prettifyResponse = function(text) { var prettifyResponse = function(text) {