org-element-headline-parser: Fix headings like * COMMENTnospace

* lisp/org-element.el (org-element-headline-parser): Do not parse
headings like * COMMENTnospace as commented.
This commit is contained in:
Ihor Radchenko 2022-06-12 13:02:39 +08:00
parent ed6f8dc67f
commit 8a0b03fb3b
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 1 deletions

View File

@ -1095,7 +1095,9 @@ Assume point is at beginning of the headline."
(commentedp
(and (let ((case-fold-search nil))
(looking-at org-element-comment-string))
(goto-char (match-end 0))))
(goto-char (match-end 0))
(when (looking-at-p "\\(?:[ \t]\\|$\\)")
(point))))
(title-start (prog1 (point)
(unless (or todo priority commentedp)
;; Headline like "* :tag:"