Skip to content

Commit

Permalink
Revert PR #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Lidén committed Oct 17, 2018
1 parent 7d6f039 commit 2a64597
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -77,14 +77,14 @@ module.exports = function (doc, styleFile) {
return '<span ' + style('json-markup-string') + '>"<a href="' + escape(obj) + '">' + escape(obj) + '</a>"</span>'

case 'array':
return forEach(obj, '', '', visit)
return forEach(obj, '[', ']', visit)

case 'object':
var keys = Object.keys(obj).filter(function (key) {
return obj[key] !== undefined
})

return forEach(keys, '', '', function (key) {
return forEach(keys, '{', '}', function (key) {
return '<span ' + style('json-markup-key') + '>"' + key + '":</span> ' + visit(obj[key])
})
}
Expand Down

0 comments on commit 2a64597

Please sign in to comment.