For a reason unknown, if we have:
* Post title :good:
:PROPERTIES:
:EXPORT_FILE_NAME: post-title
:END:
** Post sub-heading :bad:
Note that the sub-heading is *immediately* after the post heading
(of course, not counting the property).
then (org-entry-get (point) "ALLTAGS") will return ":good:bad:"!
But if we have:
* Post title :good:
:PROPERTIES:
:EXPORT_FILE_NAME: post-title
:END:
Anything here but not an Org heading (even empty line works).
** Post sub-heading :bad:
then (org-entry-get (point) "ALLTAGS") will return
":good:", as expected.
This commit ensures that the "bad" tag does not leak into the post
front-matter if the first case above happens (even though that case
is rare).
master
parent
16cf5d5956
commit
e6ebac4c20
4 changed files with 81 additions and 3 deletions
@ -0,0 +1,15 @@ |
||||
+++ |
||||
title = "Do not leak post's immediate sub-heading tag into the front-matter" |
||||
tags = ["expected-tag"] |
||||
draft = false |
||||
+++ |
||||
|
||||
## Sub-heading 1 {#sub-heading-1} |
||||
|
||||
This is a **special** case where: |
||||
|
||||
- A post has a sub-heading as the first line in its body, and |
||||
- That sub-heading has a tag too! |
||||
|
||||
The passing case for this test would be that the `unexpected_tag` does |
||||
not leak into the post's front-matter. |
||||
Loading…
Reference in new issue