Browse Source

ob-lob: fixed problem in inline call line regexp

* lisp/ob-lob.el (org-babel-inline-lob-one-liner-regexp): Updated to
  successfully match optional trailing header arguments in square
  brackets.
  (org-babel-lob-get-info): Updated to match the new regexp.
Eric Schulte 14 years ago
parent
commit
7cfca9a969
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lisp/ob-lob.el

+ 3 - 3
lisp/ob-lob.el

@@ -77,7 +77,7 @@ If you change the value of this variable then your files may
    "\\([^\n]*\\)\\(?:"
    (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|")
    "\\)_\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)"
-   "\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)\\(\\[\\([^\\[\\]]*\\)\\]\\)?")
+   "\(\\([^\n]*\\)\)\\(\\[\\(.*?\\)\\]\\)?")
   "Regexp to match inline calls to predefined source block functions.")
 
 (defconst org-babel-lob-one-liner-regexp
@@ -113,8 +113,8 @@ if so then run the appropriate source block from the Library."
 			    (if (not (= 0 (length (nonempty 5 13))))
 				(concat "[" (nonempty 5 13) "]") "")
 			    (or (nonempty 7 16) "")
-			    (or (nonempty 8 18) ""))
-		    (nonempty 9 17)))
+			    (or (nonempty 8 19) ""))
+		    (nonempty 9 18)))
 	   (list (length (nonempty 1 11)))))))))
   
 (defun org-babel-lob-execute (info)