[Sie-announce] SIEコード [1496] STPathオブジェクトにおいて、正規表現に関するバグがあったので修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 12月 24日 (木) 21:21:12 JST


Revision: 1496
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1496
Author:   dhrname
Date:     2009-12-24 21:21:12 +0900 (Thu, 24 Dec 2009)

Log Message:
-----------
STPathオブジェクトにおいて、正規表現に関するバグがあったので修正

Modified Paths:
--------------
    branches/05x/sie.js

Modified: branches/05x/sie.js
===================================================================
--- branches/05x/sie.js	2009-12-24 12:06:44 UTC (rev 1495)
+++ branches/05x/sie.js	2009-12-24 12:21:12 UTC (rev 1496)
@@ -589,20 +589,18 @@
   return this;
 };
 (function (){
-  var a = /\s*([A-DF-Z])/gi,
-      b = /^\],/,
-      c = /\s*$/,
-      d = /[\s,]{2,}|\s/g,
-      e = /([\d.])-/g;
+  var a =  /^\],/,
+      b = /\s*$/,
+      c = /[\s,]{2,}|\s/g;
 STPath.prototype.set = function ( /*float*/ w, /*float*/ h) {
   var dat = "";
   try {
     var dd = this.d
-      .replace(a, '],["$1" ') //convert to JSON array
-      .replace(b, "[")
-      .replace(c, "]]")
-      .replace(d, ",")
-      .replace(e, "$1,-");
+      .replace(/\s*([A-DF-Z])/gi, '],["$1" ') //convert to JSON array
+      .replace(a, "[")
+      .replace(b, "]]")
+      .replace(c, ",")
+      .replace(/([\d.])-/g, "$1,-");
     var D = eval('('+dd+')'); //ここまでd属性のパーサ
     var ttm = this.transformable;
     var preCom;




Sie-announce メーリングリストの案内
Back to archive index