浏览代码

org-element: Tiny fix

* lisp/org-element.el (org-element-headline-parser): Do not assume
  property drawers are correctly formed.
Nicolas Goaziou 10 年之前
父节点
当前提交
f12f9543fc
共有 1 个文件被更改,包括 7 次插入7 次删除
  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