mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-26 10:49:38 +00:00
don't interpret single "-" as a number
* lisp/ob-core.el (org-babel-number-p): Don't interpret single "-" as a number.
This commit is contained in:
parent
575c9f16c3
commit
df0c8a3bc4
@ -2521,6 +2521,7 @@ 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)
|
||||
(= (length (substring string (match-beginning 0)
|
||||
(match-end 0)))
|
||||
(length string)))
|
||||
|
Loading…
Reference in New Issue
Block a user