File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
src/Text/Pandoc/Readers/Org
test/Tests/Readers/Org/Block Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,11 @@ todoSequence = try $ do
252252
253253 where
254254 todoKeyword :: Monad m => OrgParser m Text
255- todoKeyword = many1Char nonspaceChar <* skipSpaces
255+ todoKeyword = do
256+ keyword <- many1Char nonspaceChar
257+ let cleanKeyword = T. takeWhile (/= ' (' ) keyword
258+ skipSpaces
259+ return cleanKeyword
256260
257261 todoKeywords :: Monad m => OrgParser m [Text ]
258262 todoKeywords = try $
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ tests =
118118 in headerWith (" compile" , [] , [] ) 1 (waiting <> space <> " compile" )
119119 <> headerWith (" lunch" , [] , [] ) 1 (cancelled <> space <> " lunch" )
120120 <> headerWith (" todo-feature" , [] , [] ) 1 (done <> space <> " todo-feature" )
121+
122+ , " Fast access TODO states" =:
123+ T. unlines [ " #+TODO: TODO(t) | DONE(d)"
124+ , " * TODO test"
125+ ] =?>
126+ let todoSpan = spanWith (" " , [" todo" , " TODO" ], [] ) " TODO"
127+ in headerWith (" test" , [] , [] ) 1 (todoSpan <> space <> " test" )
121128 ]
122129
123130 , " Tagged headers" =:
You can’t perform that action at this time.
0 commit comments