mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
@@ -273,7 +273,9 @@ headlineToHeader hdln = do
|
||||
todoKeyword :: Monad m => OrgParser m TodoMarker
|
||||
todoKeyword = try $ do
|
||||
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)
|
||||
|
||||
todoKeywordToInlines :: TodoMarker -> Inlines
|
||||
|
||||
@@ -87,6 +87,13 @@ tests =
|
||||
let todoSpan = spanWith ("", ["done", "DONE"], []) "DONE"
|
||||
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" =:
|
||||
"* WAITING header" =?>
|
||||
headerWith ("waiting-header", [], []) 1 "WAITING header"
|
||||
|
||||
Reference in New Issue
Block a user