Indent JSON examples.

This commit is contained in:
Mark H. Wilkinson
2017-06-13 23:07:44 +01:00
parent 99a525eac2
commit 7d24a95d78

View File

@@ -8,7 +8,7 @@ const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => {
let exampleValue let exampleValue
try { try {
exampleValue = example && example.toJS ? example.toJS() : example exampleValue = example && example.toJS ? example.toJS() : example
exampleValue = JSON.stringify(exampleValue) exampleValue = JSON.stringify(exampleValue, null, 2)
} }
catch(e) { catch(e) {
exampleValue = String(example) exampleValue = String(example)