@@ -421,6 +421,58 @@ tests =
422 bulletList [ para "Foo" <> para "bar" ] <> bulletList [ para "Baz" ]
422 bulletList [ para "Foo" <> para "bar" ] <> bulletList [ para "Baz" ]
424+ -- Test that definition list requires a leading space.
425+ -- Emacs Muse does not require a space, we follow Amusewiki here.
426+ , "Not a definition list" =:
431+ para "First :: second Foo :: bar"
432+ , "Definition list" =:
434+ [ " First :: second"
437+ definitionList [ ("First", [ para "second" ])
438+ , ("Foo", [ para "bar" ])
440+ , "Definition list term cannot include newline" =:
442+ [ " Foo" -- "Foo" is not a part of the definition list term
446+ definitionList [ ("Bar", [ para "baz" ]) ]
447+ , "Multi-line definition lists" =:
449+ [ " First term :: Definition of first term"
450+ , "and its continuation."
451+ , " Second term :: Definition of second term."
453+ definitionList [ ("First term", [ para "Definition of first term and its continuation." ])
454+ , ("Second term", [ para "Definition of second term." ])
456+ -- Emacs Muse creates two separate lists when indentation of items is different.
457+ -- We follow Amusewiki and allow different indentation within one list.
458+ , "Changing indentation" =:
460+ [ " First term :: Definition of first term"
461+ , "and its continuation."
462+ , " Second term :: Definition of second term."
464+ definitionList [ ("First term", [ para "Definition of first term and its continuation." ])
465+ , ("Second term", [ para "Definition of second term." ])
467+ , "Two blank lines separate definition lists" =:
474+ definitionList [ ("First", [ para "list" ]) ] <>
475+ definitionList [ ("Second", [ para "list" ]) ]
424 -- Headers in first column of list continuation are not allowed
476 -- Headers in first column of list continuation are not allowed
425 , "No headers in list continuation" =:
477 , "No headers in list continuation" =:
426 T.unlines
478 T.unlines