Skip to content

Commit

Permalink
Merge pull request #261 from elliotttf/fix-json-regex
Browse files Browse the repository at this point in the history
Fix nested quotes with support for empty strings
  • Loading branch information
lorenwest committed Nov 18, 2015
2 parents 6d5cb26 + 860a785 commit cd9fb5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ util.stripYamlComments = function(fileStr) {
util.stripJSONComments = function(fileStr) {
// Because we are stripping comments from JSON we are only concerned with
// strings that begin and end with a double quote.
return util.stripComments(fileStr, /("[^"]*")/g);
return util.stripComments(fileStr, /(""|("(\\"|.)+?"))/g);
};

/**
Expand Down

0 comments on commit cd9fb5c

Please sign in to comment.