JSDOC/Packer.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 27 Jul 2010 05:06:11 +0000 (13:06 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 27 Jul 2010 05:06:11 +0000 (13:06 +0800)
JSDOC/Packer.js

index d79a225..a89722f 100644 (file)
@@ -443,10 +443,10 @@ Packer.prototype = {
          
         File.write(transmd5, '');
         for(v in map) {
-            File.append(transfile, l + "\n\t \"" + v + '" : "' + v + '"');
+            File.append(transfile, l + "\n\t" + JSON.stringify(v) + " : " + JSON.stringify(v));
             l = ',';
             // strings are raw... - as the where encoded to start with!!!
-            File.append(transmd5, '_T["' + this.md5(ffn + '-' + v) + '"]="'+v+"\";\n");
+            File.append(transmd5, '_T["' + this.md5(ffn + '-' + v) + '"]='+JSON.stringify(v)+";\n");
         }
         File.append(transfile, "\n},"); // always one trailing..