parent
545da6113c
commit
7e7bc3493e
2 changed files with 10 additions and 1 deletions
|
@ -273,7 +273,9 @@ headlineToHeader hdln = do
|
||||||
todoKeyword :: Monad m => OrgParser m TodoMarker
|
todoKeyword :: Monad m => OrgParser m TodoMarker
|
||||||
todoKeyword = try $ do
|
todoKeyword = try $ do
|
||||||
taskStates <- activeTodoMarkers <$> getState
|
taskStates <- activeTodoMarkers <$> getState
|
||||||
let kwParser tdm = try (tdm <$ string (todoMarkerName tdm) <* spaceChar)
|
let kwParser tdm = try (tdm <$ string (todoMarkerName tdm)
|
||||||
|
<* spaceChar
|
||||||
|
<* updateLastPreCharPos)
|
||||||
choice (map kwParser taskStates)
|
choice (map kwParser taskStates)
|
||||||
|
|
||||||
todoKeywordToInlines :: TodoMarker -> Inlines
|
todoKeywordToInlines :: TodoMarker -> Inlines
|
||||||
|
|
|
@ -87,6 +87,13 @@ tests =
|
||||||
let todoSpan = spanWith ("", ["done", "DONE"], []) "DONE"
|
let todoSpan = spanWith ("", ["done", "DONE"], []) "DONE"
|
||||||
in headerWith ("header", [], []) 1 (todoSpan <> space <> "header")
|
in headerWith ("header", [], []) 1 (todoSpan <> space <> "header")
|
||||||
|
|
||||||
|
, "emphasis in first word" =:
|
||||||
|
"** TODO /fix/ this" =?>
|
||||||
|
let todoSpan = spanWith ("", ["todo", "TODO"], []) "TODO"
|
||||||
|
in headerWith ("fix-this", [], [])
|
||||||
|
2
|
||||||
|
(todoSpan <> space <> emph "fix" <> space <> "this")
|
||||||
|
|
||||||
, "Header with unknown todo keyword" =:
|
, "Header with unknown todo keyword" =:
|
||||||
"* WAITING header" =?>
|
"* WAITING header" =?>
|
||||||
headerWith ("waiting-header", [], []) 1 "WAITING header"
|
headerWith ("waiting-header", [], []) 1 "WAITING header"
|
||||||
|
|
Loading…
Reference in a new issue