Revert "org-element: Simplify drawer and property drawer regexps"

This reverts commit 2b96501070.

The regexp was actually incorrect and correcting it is not trivial.
This commit is contained in:
Ihor Radchenko 2023-12-10 16:00:19 +01:00
parent 1e8081aeec
commit b1cb3b724a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 8 deletions

View File

@ -621,14 +621,9 @@ Group 1 contains drawer's name or \"END\".")
"Matches an entire LOGBOOK drawer.")
(defconst org-property-drawer-re
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63225#62
(rx
;; Drawer begin line.
bol (0+ (in " \t")) ":PROPERTIES:" (0+ (in " \t")) "\n"
;; Node properties.
(*? (0+ (in " \t")) ":" (+ (not (in " \t\n:"))) ":" (* nonl) "\n")
;; Drawer end line.
(0+ (in " \t")) ":END:" (0+ (in " \t")) eol)
(concat "^[ \t]*:PROPERTIES:[ \t]*\n"
"\\(?:[ \t]*:\\S-+:\\(?:[ \t].*\\)?[ \t]*\n\\)*?"
"[ \t]*:END:[ \t]*$")
"Matches an entire property drawer.")
(defconst org-clock-drawer-re