DevTools: Format JSON even if it has with trailing whitespace

Patch by Jan Olaf Krems
https://gist.github.com/jkrems/5f08ab53c05d96356a1e

BUG=523124

Review URL: https://codereview.chromium.org/1303073002

git-svn-id: svn://svn.chromium.org/blink/trunk@200973 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9f60e785
...@@ -152,7 +152,7 @@ WebInspector.RequestJSONView.parseJSON = function(text) ...@@ -152,7 +152,7 @@ WebInspector.RequestJSONView.parseJSON = function(text)
text = text.substring(inner.start, inner.end + 1); text = text.substring(inner.start, inner.end + 1);
// Only process valid JSONP. // Only process valid JSONP.
if (suffix.length && !(suffix.trim().startsWith(")") && prefix.trim().endsWith("("))) if (suffix.trim().length && !(suffix.trim().startsWith(")") && prefix.trim().endsWith("(")))
return null; return null;
try { try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment