org-element: Tiny fix
* lisp/org-element.el (org-element--list-struct): Fix regexp. Small refactoring.
This commit is contained in:
parent
d49957ef02
commit
e3fa9355f3
|
@ -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))))
|
||||
|
|
Loading…
Reference in New Issue