diff options
author | Dan Davison <dandavison7@gmail.com> | 2011-02-06 15:00:08 +0000 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2011-02-13 11:03:58 +0000 |
commit | a8f2163d76e7936ee22e2a0a4324226d8f771819 (patch) | |
tree | 18059741f593b5eb23c16a4f4c027837607c9371 | |
parent | 10f5ac643daf7d9e6bff87d6b5f7eafb6f6f30b4 (diff) | |
download | org-mode-a8f2163d76e7936ee22e2a0a4324226d8f771819.tar.gz |
ob: `substring' comparison instead of regexp matching
* lisp/ob.el (org-babel-script-escape): Use `substring' comparison
instead of regexp matching
Workaround for regexp limitation, e.g.
(string-match
"^\\[.+\\]$"
(concat
"["
(mapconcat (lambda (i) "x") (number-sequence 1 33500) "")
"]"))
gives "Stack overflow in regexp matcher" in several current builds.
-rw-r--r-- | lisp/ob.el | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1857,7 +1857,10 @@ block but are passed literally to the \"example-block\"." "Safely convert tables into elisp lists." (let (in-single in-double out) (org-babel-read - (if (and (stringp str) (string-match "^\\[.+\\]$" str)) + (if (and (stringp str) + (> (length str) 2) + (string-equal "[" (substring str 0 1)) + (string-equal "]" (substring str -1))) (org-babel-read (concat "'" |