Przeglądaj źródła

babel: smarter `org-babel-ref-split-args' -- fixes bug parsing indexed function-style args

Eric Schulte 15 lat temu
rodzic
commit
692c569215
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      contrib/babel/lisp/org-babel-ref.el

+ 2 - 2
contrib/babel/lisp/org-babel-ref.el

@@ -193,8 +193,8 @@ which case the entire range is returned."
         (when (= depth 0)
           (setq return (reverse (cons (substring buffer 0 -1) return)))
           (setq buffer "")))
-       ((string= holder "(") (setq depth (+ depth 1)))
-       ((string= holder ")") (setq depth (- depth 1)))))
+       ((or (string= holder "(") (string= holder "[")) (setq depth (+ depth 1)))
+       ((or (string= holder ")") (string= holder "]")) (setq depth (- depth 1)))))
     (mapcar #'org-babel-trim (reverse (cons buffer return)))))
 
 (defun org-babel-ref-at-ref-p ()