Closed calmofthestorm closed 4 years ago
I'm quite surprised that org-elements api will treat *a
as a valid headline. In this case, I think we can just leave it as it is...
I could also send a PR for adding a errata/quirks documentation if you like.
PR is welcome! You can create a docs/
directly at root for documents.
A few more cases like this I should document when I write the PR.
(with-temp-buffer (insert "*")(org-element-parse-buffer (point-max)))
(with-temp-buffer (insert "*\r")(org-element-parse-buffer (point-max)))
(with-temp-buffer (insert "*\t")(org-element-parse-buffer (point-max)))
let org = orgize::Org::parse("* \tTODO");
// org-element gets nil for this.
assert_eq!(org.headlines().next().unwrap().title(&org).keyword, None);
let org = orgize::Org::parse("* \t TODO");
// org-element gets nil for this.
assert_eq!(org.headlines().next().unwrap().title(&org).keyword, None);
I wanted to mention a few edge cases I found involving headlines that don't have a space after the stars. Per the spec, none of these are headlines.
The first two are treated as headlines by org-element, but not org-agenda tags, org mode font lock, or orgize.
The second two are treated as headlines by org-element and orgize, but not org mode font lock.
It's fine if you want to just close this -- I'm not even entirely sure what the correct behavior should be. I just wanted to mention it since I found it when testing something. I could also send a PR for adding a errata/quirks documentation if you like.