Permalink
Browse files

prefixing all css classes

  • Loading branch information...
1 parent f134e00 commit 76ea4ca3c7dee9fea559809a60f8f86835e67b5a @mafintosh committed Jan 30, 2013
Showing with 14 additions and 14 deletions.
  1. +2 −2 component.json
  2. +6 −6 index.js
  3. +1 −1 package.json
  4. +5 −5 style.css
View
@@ -1,10 +1,10 @@
{
"name":"json-markup",
"repo":"mafintosh/json-markup",
- "version":"0.1.2",
+ "version":"0.1.3",
"description":"a json to html syntax highlighter",
"keywords": ["json", "html", "syntax", "highlight"],
"author": "Mathias Buus Madsen <mathiasbuus@gmail.com>",
"scripts": ["index.js"],
"styles": ["style.css"]
-}
+}
View
@@ -34,19 +34,19 @@ module.exports = function(doc) {
switch (type(obj)) {
case 'boolean':
- return '<span class="bool">'+obj+'</span>';
+ return '<span class="json-markup-bool">'+obj+'</span>';
case 'number':
- return '<span class="number">'+obj+'</span>';
+ return '<span class="json-markup-number">'+obj+'</span>';
case 'null':
- return '<span class="null">null</span>\n';
+ return '<span class="json-markup-null">null</span>\n';
case 'string':
- return '<span class="string">"'+escape(obj)+'"</span>';
+ return '<span class="json-markup-string">"'+escape(obj)+'"</span>';
case 'link':
- return '<span class="string">"<a href="'+escape(obj)+'">'+escape(obj)+'</a>"</span>';
+ return '<span class="json-markup-string">"<a href="'+escape(obj)+'">'+escape(obj)+'</a>"</span>';
case 'array':
return forEach(obj, '[', ']', visit);
@@ -57,7 +57,7 @@ module.exports = function(doc) {
});
return forEach(keys, '{', '}', function(key) {
- return '<span class="key">'+key + ':</span> '+visit(obj[key]);
+ return '<span class="json-markup-key">'+key + ':</span> '+visit(obj[key]);
});
}
View
@@ -1,6 +1,6 @@
{
"name":"json-markup",
- "version":"0.1.2",
+ "version":"0.1.3",
"repository": "git://github.com/mafintosh/json-markup",
"description":"a json to html syntax highlighter",
"keywords": ["json", "html", "syntax", "highlight"],
View
@@ -4,18 +4,18 @@
font-family: monospace;
white-space: pre;
}
-.json-markup .key {
+.json-markup-key {
font-weight: bold;
}
-.json-markup .bool {
+.json-markup-bool {
color: firebrick;
}
-.json-markup .string {
+.json-markup-string {
color: green;
}
-.json-markup .null {
+.json-markup-null {
color: gray;
}
-.json-markup .number {
+.json-markup-number {
color: blue;
}

0 comments on commit 76ea4ca

Please sign in to comment.