aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-07-29 18:37:07 -0700
committerJohn MacFarlane <[email protected]>2025-07-29 18:37:07 -0700
commit4066a9d483d3aac7c56009050611342d00ce1ead (patch)
tree6016a4a740f8015cde3b3cab39a42bf17c74d4b2 /src
parentf5262d88e492802169a03efffd8c3ce292cfce9c (diff)
Asciidoc writer: handle lists with sublists following continuations.
These require an additional blank line in some cases. Closes #11006.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/AsciiDoc.hs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs
index 5904f7da1..333b62a74 100644
--- a/src/Text/Pandoc/Writers/AsciiDoc.hs
+++ b/src/Text/Pandoc/Writers/AsciiDoc.hs
@@ -438,8 +438,17 @@ addBlock opts d b = do
x <- chomp <$> blockToAsciiDoc opts b
return $
case b of
- BulletList{} -> d <> cr <> x
- OrderedList{} -> d <> cr <> x
+ BulletList{}
+ -> case d of
+ Concat (Concat _ CarriageReturn) (Text 1 "+")
+ -> d <> blankline <> x -- see #11006
+ _ -> d <> cr <> x
+ OrderedList listAttr _
+ -> case d of
+ Concat (Concat _ CarriageReturn) (Text 1 "+")
+ | (1, DefaultStyle, _) <- listAttr
+ -> d <> blankline <> x -- see #11006
+ _ -> d <> cr <> x
Para (Math DisplayMath _:_) -> d <> cr <> x
Plain (Math DisplayMath _:_) -> d <> cr <> x
Para{} | isEmpty d -> x