Skip to content

Commit

Permalink
feature josdejong#144 - fixed an issue (stripping comments wasn't wor…
Browse files Browse the repository at this point in the history
…king)
  • Loading branch information
yanivefraim committed Feb 11, 2015
1 parent 3f8d10d commit 57691e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions jsoneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,7 @@ return /******/ (function(modules) { // webpackBootstrap
return $1 + '"' + $2 + '"' + $3;
});


jsonString.replace(/\*(.|[\r\n])*?\*/g,'');//Remove all code comments
jsonString = jsonString.replace(/\/\*(.|[\r\n])*?\*\//g,'');//Remove all code comments

//If JSON starts with a function (Carachters/digist/"_-"), remove this function.
//This is usefull for "stripping" JSONP objects to become JSON
Expand Down
2 changes: 1 addition & 1 deletion jsoneditor.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jsoneditor.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ define(function () {
return $1 + '"' + $2 + '"' + $3;
});


jsonString.replace(/\*(.|[\r\n])*?\*/g,'');//Remove all code comments
jsonString = jsonString.replace(/\/\*(.|[\r\n])*?\*\//g,'');//Remove all code comments

//If JSON starts with a function (Carachters/digist/"_-"), remove this function.
//This is usefull for "stripping" JSONP objects to become JSON
Expand Down

0 comments on commit 57691e5

Please sign in to comment.