Skip to content

Commit

Permalink
indenting multiline strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Dec 20, 2013
1 parent 9b9a77e commit 70b8066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -43,7 +43,7 @@ module.exports = function(doc) {
return '<span class="json-markup-null">null</span>\n';

case 'string':
return '<span class="json-markup-string">"'+escape(obj)+'"</span>';
return '<span class="json-markup-string">"'+escape(obj.replace(/\n/g, '\n'+indent))+'"</span>';

case 'link':
return '<span class="json-markup-string">"<a href="'+escape(obj)+'">'+escape(obj)+'</a>"</span>';
Expand Down

0 comments on commit 70b8066

Please sign in to comment.