Browse Source

Fix two regular expressions

* lisp/org.el (org-property-drawer-re): Make less greedy to avoid
overreaching matches.
(org-clock-drawer-re): Make less greedy to avoid
overreaching matches.
Carsten Dominik 4 years ago
parent
commit
08d9c1b42c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -15051,12 +15051,12 @@ Being in this list makes sure that they are offered for completion.")
   "Regular expression matching the first line of a property drawer.")
 
 (defconst org-property-drawer-re
-  (concat "\\(" org-property-start-re "\\)[^\000]*\\("
+  (concat "\\(" org-property-start-re "\\)[^\000]*?\\("
 	  org-property-end-re "\\)\n?")
   "Matches an entire property drawer.")
 
 (defconst org-clock-drawer-re
-  (concat "\\(" org-clock-drawer-start-re "\\)[^\000]*\\("
+  (concat "\\(" org-clock-drawer-start-re "\\)[^\000]*?\\("
 	  org-property-end-re "\\)\n?")
   "Matches an entire clock drawer.")