forked from mirrors/org-mode
Parse titleless headlines with a tag correctly
* lisp/org-element.el (org-element-headline-parser): Do not treat tag as headline title in headlines like "* :tag:".
This commit is contained in:
parent
31929f539c
commit
32b9251886
|
@ -1021,7 +1021,10 @@ Assume point is at beginning of the headline."
|
||||||
(commentedp
|
(commentedp
|
||||||
(and (let (case-fold-search) (looking-at org-comment-string))
|
(and (let (case-fold-search) (looking-at org-comment-string))
|
||||||
(goto-char (match-end 0))))
|
(goto-char (match-end 0))))
|
||||||
(title-start (point))
|
(title-start (prog1 (point)
|
||||||
|
(unless (or todo priority commentedp)
|
||||||
|
;; Headline like "* :tag:"
|
||||||
|
(skip-syntax-backward " \t"))))
|
||||||
(tags (when (re-search-forward
|
(tags (when (re-search-forward
|
||||||
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
|
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
|
||||||
(line-end-position)
|
(line-end-position)
|
||||||
|
|
Loading…
Reference in New Issue