From ec0e3cf70ba353ea59a5e662353333462f659c99 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 22 Jul 2014 11:52:32 +0200 Subject: [PATCH] org-element: Fix regexp matching LaTeX environments * lisp/org-element.el (org-element--current-element): Fix regexp matching latex environments. Discrepancy with regexp used in `org-element-latex-environment-parser' introduced matching errors. --- lisp/org-element.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 0c959c0ce..a67cc3cc6 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3890,8 +3890,7 @@ element it has to parse." (goto-char (car affiliated)) (org-element-keyword-parser limit nil)) ;; LaTeX Environment. - ((looking-at - "[ \t]*\\\\begin{[A-Za-z0-9*]+}\\(\\[.*?\\]\\|{.*?}\\)*[ \t]*$") + ((looking-at "[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}") (org-element-latex-environment-parser limit affiliated)) ;; Drawer and Property Drawer. ((looking-at org-drawer-regexp)