Permalink
Browse files

correctly calculate value length

  • Loading branch information...
1 parent b27c417 commit cc92844d09b3e6456256d7b237a50d9807f12d75 @dominictarr dominictarr committed Jun 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -45,7 +45,7 @@ var jsup = module.exports = function (src) {
var start = c[0].start.pos - 2;
if (c[0].start.pos === c[0].end.pos) {
- var end = start + c[1].toString().length;
+ var end = start + JSON.stringify(c[1]).length;
}
else {
var end = c[0].end.pos - 1;

0 comments on commit cc92844

Please sign in to comment.