ソースを参照

org-element: Keep compatibility with Babel's regexps

* lisp/org-element.el (org-element-inline-babel-call-successor): Use
  original regexp to stay up-to-date with Babel changes.
Nicolas Goaziou 11 年 前
コミット
b22714a88d
1 ファイル変更2 行追加6 行削除
  1. 2 6
      lisp/org-element.el

+ 2 - 6
lisp/org-element.el

@@ -2918,12 +2918,8 @@ CONTENTS is nil."
 Return value is a cons cell whose CAR is `inline-babel-call' and
 CDR is beginning position."
   (save-excursion
-    ;; Use a simplified version of
-    ;; `org-babel-inline-lob-one-liner-regexp'.
-    (when (re-search-forward
-	   "call_\\([^()\n]+?\\)\\(?:\\[.*?\\]\\)?([^\n]*?)\\(\\[.*?\\]\\)?"
-	   nil t)
-      (cons 'inline-babel-call (match-beginning 0)))))
+    (when (re-search-forward org-babel-inline-lob-one-liner-regexp nil t)
+      (cons 'inline-babel-call (match-end 1)))))
 
 
 ;;;; Inline Src Block