git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: allow single colon in definition list term
commit39dd7c794bc881acd2030c07ddfb7b34842f19a3 authorAlexander Krotov <ilabdsf@gmail.com> dateSat 24 Feb 2018, 02:37 (9 years ago) parent6de2c07
2 files changed+4−1
src/Text/Pandoc/Readers/Muse.hs+1−1 test/Tests/Readers/Muse.hs+3
src/Text/Pandoc/Readers/Muse.hs+1−1
@@ -625,7 +625,7 @@ definitionListItemsUntil indent end =
625625 where
626626 continuation = try $ do
627627 pos <- getPosition
628− term <- trimInlinesF . mconcat <$> manyTill (choice inlineList) (string "::")
628+ term <- trimInlinesF . mconcat <$> manyTill (choice inlineList) (try $ string "::")
629629 (x, e) <- descriptionsUntil (sourceColumn pos) ((Right <$> try (optional blankline >> indentWith indent >> continuation)) <|> (Left <$> end))
630630 let xx = do
631631 term' <- term
test/Tests/Readers/Muse.hs+3
@@ -1073,6 +1073,9 @@ tests =
10731073 definitionList [ ("Bar", [ para "baz" ]) ]
10741074 , "One-line definition list" =: " foo :: bar" =?>
10751075 definitionList [ ("foo", [ para "bar" ]) ]
1076+ , "Definition list term may include single colon" =:
1077+ " foo:bar :: baz" =?>
1078+ definitionList [ ("foo:bar", [ para "baz" ]) ]
10761079 , "Definition list term with emphasis" =: " *Foo* :: bar\n" =?>
10771080 definitionList [ (emph "Foo", [ para "bar" ]) ]
10781081 , "Definition list term with :: inside code" =: " foo <code> :: </code> :: bar <code> :: </code> baz\n" =?>