aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-03-27 18:52:57 -0700
committerJohn MacFarlane <[email protected]>2023-03-27 18:52:57 -0700
commitae8ba75c0a0f3fe910c8b94207c1948cdbad5e2e (patch)
tree7b7ae58669bdddd8c89e223ee69958f230aa1c38 /src
parentf97ab76f81b9d1bd485148d8453ed3a2bbab800b (diff)
Typst writer: fix alignment issue in lists.
It's an aesthetic issue only; the first line had an extra space indent after the list marker.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 1a146fe26..208d90c7c 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -146,14 +146,14 @@ blockToTypst block =
text (show start) )) $$
x $$
"]"
- items' <- mapM (fmap chomp . listItemToTypst 2 ("+ ")) items
+ items' <- mapM (fmap chomp . listItemToTypst 2 ("+")) items
return $ addBlock
(if isTightList items
then vcat items'
else vsep items')
$$ blankline
BulletList items -> do
- items' <- mapM (fmap chomp . listItemToTypst 2 "- ") items
+ items' <- mapM (fmap chomp . listItemToTypst 2 "-") items
return $ (if isTightList items
then vcat items'
else vsep items') $$ blankline
@@ -209,6 +209,7 @@ defListItemToTypst (term, defns) = do
defns' <- mapM blocksToTypst defns
return $ nowrap ("/ " <> term' <> ": " <> "#block[") $$
chomp (vcat defns') $$ "]"
+
listItemToTypst :: PandocMonad m => Int -> Doc Text -> [Block] -> TW m (Doc Text)
listItemToTypst ind marker blocks = do
contents <- blocksToTypst blocks