Explorar el Código

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 hace 12 años
padre
commit
af6f32af1a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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)))