org-element: Fix item parsing with an empty first line and a child below

* contrib/lisp/org-element.el (org-element-item-parser): If item's
  first line is empty, ensure contents start at a beginning of line so
  that child can be correctly parsed.
This commit is contained in:
Nicolas Goaziou 2012-01-30 20:43:09 +01:00
parent ae87b6e5f2
commit a623767a90
1 changed files with 5 additions and 3 deletions

View File

@ -588,9 +588,11 @@ Assume point is at the beginning of the item."
(contents-begin (progn (looking-at org-list-full-item-re)
(goto-char (match-end 0))
(org-skip-whitespace)
(if (>= (point) end)
(point-at-bol)
(point))))
;; If first line isn't empty,
;; contents really start at the text
;; after item's meta-data.
(if (= (point-at-bol) begin) (point)
(point-at-bol))))
(hidden (progn (forward-line)
(and (not (= (point) end))
(org-truely-invisible-p))))