Browse Source

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 4 years ago
parent
commit
af6f32af1a
1 changed files with 2 additions and 2 deletions
  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)))