Browse Source

org-element: Tiny fix

* lisp/org-element.el (org-element-headline-parser): Do not assume
  property drawers are correctly formed.
Nicolas Goaziou 10 years ago
parent
commit
f12f9543fc
1 changed files with 7 additions and 7 deletions
  1. 7 7
      lisp/org-element.el

+ 7 - 7
lisp/org-element.el

@@ -839,13 +839,13 @@ Assume point is at beginning of the headline."
 			(when end
 			  (forward-line)
 			  (while (< (point) end)
-			    (looking-at org-property-re)
-			    (setq plist
-				  (plist-put
-				   plist
-				   (intern
-				    (concat ":" (upcase (match-string 2))))
-				   (org-match-string-no-properties 3)))
+			    (when (looking-at org-property-re)
+			      (setq plist
+				    (plist-put
+				     plist
+				     (intern
+				      (concat ":" (upcase (match-string 2))))
+				     (org-match-string-no-properties 3))))
 			    (forward-line)))))))
 		plist)))
 	   (time-props