Permalink
Browse files

add key / value classnames to strings

  • Loading branch information...
1 parent 9a54377 commit 298aac2998550d19e96e98d8f1a06e54d8cb15ae @tj tj committed Jul 4, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 example.js
  2. +2 −2 index.js
View
@@ -16,4 +16,4 @@ var obj = {
]
};
-console.log(html(obj));
+console.log('<pre>' + html(obj) + '</pre>');
View
@@ -50,7 +50,7 @@ function html(obj, indents) {
}
if ('string' == typeof obj) {
- return span('string', '"' + escape(obj) + '"');
+ return span('string value', '"' + escape(obj) + '"');
}
if ('number' == typeof obj) {
@@ -86,7 +86,7 @@ function html(obj, indents) {
buf += keys.map(function(key){
var val = obj[key];
key = '"' + key + '"';
- key = span('string', key);
+ key = span('string key', key);
return indent() + key + ': ' + html(val, indents);
}).join(',\n');
--indents;

0 comments on commit 298aac2

Please sign in to comment.