aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-02-12 09:41:20 -0800
committerJohn MacFarlane <[email protected]>2025-02-12 09:41:20 -0800
commit0fe62545358a373e4e22fa2421dd51dcc4400123 (patch)
tree8437f587bb390193eb72786616c69ada343895f8 /src
parent1a8db18d6a2b7d649c3d3a22da1f8e289f6b1ddb (diff)
Markdown writer: omit extra space after bullets.
We used to insert extra spaces to ensure that the content respected the four-space rule. That is not really necessary now, since pandoc's markdown and most markdowns don't follow the four-space rule. Those who want the old behavior can obtain it by using `-t markdown+four_space_rule`. Closes #7172.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 57d61be42..60cd4b370 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -782,7 +782,10 @@ bulletListItemToMarkdown opts bs = do
let start = case variant of
Markua -> "* "
Commonmark -> "- "
- _ -> "- " <> T.replicate (writerTabStop opts - 2) " "
+ Markdown
+ | isEnabled Ext_four_space_rule opts
+ -> "- " <> T.replicate (writerTabStop opts - 2) " "
+ _ -> "- "
-- remove trailing blank line if item ends with a tight list
let contents' = if itemEndsWithTightList bs
then chomp contents <> cr