Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cheton/i18next-scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheton Wu (RD-TW) committed Mar 27, 2015
2 parents ca8356e + deaa33b commit 1315927
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ var customTransform = function(file, enc, done) {

if (r) {
value = _.trim(r[1], '\'"');

// Replace double backslash with single backslash
value = value.replace(/\\\\/g, '\\');
value = value.replace(/\\\'/, '\'');

key = hash(value); // returns a hash value as its default key
parser.parse(key, value);
}
Expand Down Expand Up @@ -173,6 +178,10 @@ var customTransform = function(file, enc, done) {

if ( ! _.isUndefined(r[1])) {
value = _.trim(r[1], '\'"');

// Replace double backslash with single backslash
value = value.replace(/\\\\/g, '\\');
value = value.replace(/\\\'/, '\'');
}

var params = parser.parseHashArguments(r[2]);
Expand Down

0 comments on commit 1315927

Please sign in to comment.