瀏覽代碼

fix commit df0c8a3bc44286c06b3306503a95382805651e2c

* lisp/ob-core.el (org-babel-number-p): String match for any number
  moved first so that the match data for the length check does not
  become corrupted.
Achim Gratz 12 年之前
父節點
當前提交
af6f32af1a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/ob-core.el

+ 2 - 2
lisp/ob-core.el

@@ -2525,8 +2525,8 @@ appropriate."
 
 (defun org-babel-number-p (string)
   "If STRING represents a number return its value."
-  (if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string)
-	   (string-match "[0-9]+" string)
+  (if (and (string-match "[0-9]+" string)
+	   (string-match "^-?[0-9]*\\.?[0-9]*$" string)
            (= (length (substring string (match-beginning 0)
 				 (match-end 0)))
 	      (length string)))