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
|
where
|
||||||
continuation = try $ do
|
continuation = try $ do
|
||||||
pos <- getPosition
|
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))
|
(x, e) <- descriptionsUntil (sourceColumn pos) ((Right <$> try (optional blankline >> indentWith indent >> continuation)) <|> (Left <$> end))
|
||||||
let xx = do
|
let xx = do
|
||||||
term' <- term
|
term' <- term
|
||||||
|
|
|
@ -1073,6 +1073,9 @@ tests =
|
||||||
definitionList [ ("Bar", [ para "baz" ]) ]
|
definitionList [ ("Bar", [ para "baz" ]) ]
|
||||||
, "One-line definition list" =: " foo :: bar" =?>
|
, "One-line definition list" =: " foo :: bar" =?>
|
||||||
definitionList [ ("foo", [ para "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" =?>
|
, "Definition list term with emphasis" =: " *Foo* :: bar\n" =?>
|
||||||
definitionList [ (emph "Foo", [ para "bar" ]) ]
|
definitionList [ (emph "Foo", [ para "bar" ]) ]
|
||||||
, "Definition list term with :: inside code" =: " foo <code> :: </code> :: bar <code> :: </code> baz\n" =?>
|
, "Definition list term with :: inside code" =: " foo <code> :: </code> :: bar <code> :: </code> baz\n" =?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue