From ae8ba75c0a0f3fe910c8b94207c1948cdbad5e2e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 27 Mar 2023 18:52:57 -0700 Subject: 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. --- src/Text/Pandoc/Writers/Typst.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') 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 -- cgit v1.2.3