mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 18:36:26 +00:00
ob-core.el: Fix `org-babel--string-to-number'
* lisp/ob-core.el (org-babel--string-to-number): Prevent strings containing whitespaces after being trimmed to be interpreted as numbers.
This commit is contained in:
parent
6b2a7cb20b
commit
d0018ce62c
|
@ -2932,9 +2932,10 @@ situations in which is it not appropriate."
|
|||
(defun org-babel--string-to-number (string)
|
||||
"If STRING represents a number return its value.
|
||||
Otherwise return nil."
|
||||
(let ((interned-string (ignore-errors (read string))))
|
||||
(when (numberp interned-string)
|
||||
interned-string)))
|
||||
(unless (string-match-p "\\s-" (org-trim string))
|
||||
(let ((interned-string (ignore-errors (read string))))
|
||||
(when (numberp interned-string)
|
||||
interned-string))))
|
||||
|
||||
(defun org-babel-import-elisp-from-file (file-name &optional separator)
|
||||
"Read the results located at FILE-NAME into an elisp table.
|
||||
|
|
Loading…
Reference in a new issue