mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Optimization on the regex
This commit is contained in:
parent
186d673517
commit
226e38851f
@ -319,7 +319,7 @@
|
||||
prettifiedJsonString = prettifiedJsonString.replace(/(\{|\[)\n/g, function(match, sectionOpenCharacter) {
|
||||
return getJsonCollapseHtml(sectionOpenCharacter) + '<span class="json-collapse-content">\n';
|
||||
});
|
||||
return prettifiedJsonString.replace(/([^\[][\}\]])(,)?\n/g, '$1$2</span>\n');
|
||||
return prettifiedJsonString.replace(/([^\[][\}\]],?)\n/g, '$1</span>\n');
|
||||
};
|
||||
|
||||
var prettifyResponse = function(text) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user