Muse reader: allow single colon in definition list term
This commit is contained in:
parent
6de2c0710f
commit
39dd7c794b
2 changed files with 4 additions and 1 deletions
|
@ -625,7 +625,7 @@ definitionListItemsUntil indent end =
|
|||
where
|
||||
continuation = try $ do
|
||||
pos <- getPosition
|
||||
term <- trimInlinesF . mconcat <$> manyTill (choice inlineList) (string "::")
|
||||
term <- trimInlinesF . mconcat <$> manyTill (choice inlineList) (try $ string "::")
|
||||
(x, e) <- descriptionsUntil (sourceColumn pos) ((Right <$> try (optional blankline >> indentWith indent >> continuation)) <|> (Left <$> end))
|
||||
let xx = do
|
||||
term' <- term
|
||||
|
|
|
@ -1073,6 +1073,9 @@ tests =
|
|||
definitionList [ ("Bar", [ para "baz" ]) ]
|
||||
, "One-line definition list" =: " foo :: bar" =?>
|
||||
definitionList [ ("foo", [ para "bar" ]) ]
|
||||
, "Definition list term may include single colon" =:
|
||||
" foo:bar :: baz" =?>
|
||||
definitionList [ ("foo:bar", [ para "baz" ]) ]
|
||||
, "Definition list term with emphasis" =: " *Foo* :: bar\n" =?>
|
||||
definitionList [ (emph "Foo", [ para "bar" ]) ]
|
||||
, "Definition list term with :: inside code" =: " foo <code> :: </code> :: bar <code> :: </code> baz\n" =?>
|
||||
|
|
Loading…
Reference in a new issue