Browse Source

org-element: Tiny fix

* lisp/org-element.el (org-element--list-struct): Fix regexp.  Small
  refactoring.
Nicolas Goaziou 3 years ago
parent
commit
e3fa9355f3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      lisp/org-element.el

+ 2 - 3
lisp/org-element.el

@@ -1284,10 +1284,9 @@ CONTENTS is the contents of the element."
 		    (throw 'exit (sort struct 'car-less-than-car))))))
 	    ;; Skip blocks (any type) and drawers contents.
 	    (cond
-	     ((and (looking-at "\\(?:[ \t]*\\)?#\\+BEGIN\\(:\\|_\\S-+\\)")
+	     ((and (looking-at "#\\+BEGIN\\(:\\|_\\S-+\\)")
 		   (re-search-forward
-		    (format "^[ \t]*#\\+END%s[ \t]*$"
-			    (org-match-string-no-properties 1))
+		    (format "^[ \t]*#\\+END%s[ \t]*$" (match-string 1))
 		    limit t)))
 	     ((and (looking-at org-drawer-regexp)
 		   (re-search-forward "^[ \t]*:END:[ \t]*$" limit t))))