aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs4
-rw-r--r--tests/writer.markdown44
2 files changed, 24 insertions, 24 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 3ec94af9d..a95c0ba7b 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -355,13 +355,13 @@ definitionListItemToMarkdown opts (label, defs) = do
labelText <- inlineListToMarkdown opts label
let tabStop = writerTabStop opts
st <- get
- let leader = if stPlain st then " " else " ~"
+ let leader = if stPlain st then " " else ": "
let sps = case writerTabStop opts - 3 of
n | n > 0 -> text $ replicate n ' '
_ -> text " "
defs' <- mapM (mapM (blockToMarkdown opts)) defs
let contents = vcat $ map (\d -> hang tabStop (leader <> sps) $ vcat d <> cr) defs'
- return $ labelText <> cr <> contents <> cr
+ return $ nowrap labelText <> cr <> contents <> cr
-- | Convert list of Pandoc block elements to markdown.
blockListToMarkdown :: WriterOptions -- ^ Options
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 14fc3a434..3d0fb765f 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -272,41 +272,41 @@ Definition Lists
Tight using spaces:
apple
- ~ red fruit
+: red fruit
orange
- ~ orange fruit
+: orange fruit
banana
- ~ yellow fruit
+: yellow fruit
Tight using tabs:
apple
- ~ red fruit
+: red fruit
orange
- ~ orange fruit
+: orange fruit
banana
- ~ yellow fruit
+: yellow fruit
Loose:
apple
- ~ red fruit
+: red fruit
orange
- ~ orange fruit
+: orange fruit
banana
- ~ yellow fruit
+: yellow fruit
Multiple blocks with italics:
*apple*
- ~ red fruit
+: red fruit
contains seeds, crisp, pleasant to taste
*orange*
- ~ orange fruit
+: orange fruit
{ orange code block }
@@ -315,33 +315,33 @@ Multiple blocks with italics:
Multiple definitions, tight:
apple
- ~ red fruit
- ~ computer
+: red fruit
+: computer
orange
- ~ orange fruit
- ~ bank
+: orange fruit
+: bank
Multiple definitions, loose:
apple
- ~ red fruit
+: red fruit
- ~ computer
+: computer
orange
- ~ orange fruit
+: orange fruit
- ~ bank
+: bank
Blank line after term, indented marker, alternate markers:
apple
- ~ red fruit
+: red fruit
- ~ computer
+: computer
orange
- ~ orange fruit
+: orange fruit
1. sublist
2. sublist