Skip to content

Commit

Permalink
fix: fix issue 9
Browse files Browse the repository at this point in the history
  • Loading branch information
colin.ck committed Apr 4, 2018
1 parent 3df6945 commit 7fe1f79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JSONPretty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = createReactClass({
var booSpan = '<span class=json-boolean>';
var sps = ind || '';
if (key) {
sps = sps + '"' + keySpan + key.replace(/[": ]/g, '') + spanEnd + '": ';
sps = sps + '"' + keySpan + key.replace(/^"|":\s$/g, '')+ spanEnd + '": ';
}

if (val) {
Expand Down
1 change: 1 addition & 0 deletions src/JSONPretty.1337.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.json-pretty{line-height:1.3;color:#f8f8f2;background:#1e1e1e;}.json-pretty .json-key{color:#ff5e5e}.json-pretty .json-value{color:#fdb082}.json-pretty .json-string{color:#e9fdac}.json-pretty .json-boolean{color:#69c}
2 changes: 1 addition & 1 deletion src/JSONPretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = createReactClass({
var booSpan = '<span class=json-boolean>';
var sps = ind || '';
if (key) {
sps = sps + '"' + keySpan + key.replace(/^"|":\s$/g, '') + spanEnd + '": ';
sps = sps + '"' + keySpan + key.replace(/[": ]/g, '') + spanEnd + '": ';
}

if (val) {
Expand Down

0 comments on commit 7fe1f79

Please sign in to comment.