Browse Source

org-element: Tiny fix

* lisp/org-element.el (org-element--list-struct): Fix regexp.  Small
  refactoring.
Nicolas Goaziou 11 năm trước cách đây
mục cha
commit
e3fa9355f3
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  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))))