Skip to content

Org reader doesn't support parsing fast access TODO states #10792

@RyanGibb

Description

@RyanGibb

Relevant section of the org-mode manual: https://orgmode.org/manual/Fast-access-to-TODO-states.html

I.e. this isn't parsed as a keyword:

#+TODO: TODO(t) | DONE(d)
* TODO test
[ Header
    1
    ( "todo-test" , [] , [] )
    [ Str "TODO" , Space , Str "test" ]
]

But this is:

#+TODO: TODO(t) | DONE(d)
* TODO(t) test
[ Header
    1
    ( "test" , [] , [] )
    [ Span
        ( "" , [ "todo" , "TODO(t)" ] , [] ) [ Str "TODO(t)" ]
    , Space
    , Str "test"
    ]
]

I think this is where the omission is

todoKeyword :: Monad m => OrgParser m Text
todoKeyword = many1Char nonspaceChar <* skipSpaces
todoKeywords :: Monad m => OrgParser m [Text]
todoKeywords = try $
let endOfKeywords = todoDoneSep <|> void newline
in manyTill todoKeyword (lookAhead endOfKeywords)
doneKeywords :: Monad m => OrgParser m [Text]
doneKeywords = try $
manyTill (todoKeyword <* optional todoDoneSep) (lookAhead newline)

I'm on pandoc 3.1.11.1.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions