org-parser
org-parser copied to clipboard
Tags with underscore are not parsed correctly
According to the Org user guide, tags are defined as follows:
Tags are normal words containing letters, numbers, ‘_’, and ‘@’.
But the parser seems to handle the _
as a format annotation.
(transform (parse "* Headline :tag_a:\n"))
;; => {:headlines
[{:headline
{:level 1,
:title
[[:text-normal "Headline :tag"]
[:text-sub [:text-subsup-word "a"]]
[:text-normal ":"]],
:planning [],
:tags []}}]}
In my opinion, the correct behavior would be
(transform (parse "* Headline :tag_a:\n"))
;; => {:headlines
[{:headline
{:level 1,
:title [[:text-normal "Headline"]],
:planning [],
:tags ["tag_a"]}}]}
This is with org-parser 0.1.27 with Clojure on the JVM.