File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,15 +403,15 @@ blockToTypst block =
403403 contents <- blocksToTypst blocks
404404 return $ " #block" <> toTypstPropsListParens typstAttrs <> " ["
405405 $$ toTypstPoundSetText typstTextAttrs
406- $$ contents
406+ $$ chomp contents
407407 $$ (" ]" <+> lab)
408408
409409defListItemToTypst :: PandocMonad m => ([Inline ], [[Block ]]) -> TW m (Doc Text )
410410defListItemToTypst (term, defns) = do
411411 modify $ \ st -> st{ stEscapeContext = TermContext }
412412 term' <- inlinesToTypst term
413413 modify $ \ st -> st{ stEscapeContext = NormalContext }
414- defns' <- mapM blocksToTypst defns
414+ defns' <- mapM ( fmap chomp . blocksToTypst) defns
415415 return $
416416 case defns of
417417 [[Plain _]] -> hang 4 (nowrap (" / " <> term' <> " : " )) (vcat defns')
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ This text should be in English.
77#block[
88#set text(lang: "en");
99This text should be in English.
10-
1110]
1211```
1312
@@ -20,7 +19,6 @@ Ce texte devrait être en français.
2019#block[
2120#set text(lang: "fr");
2221Ce texte devrait être en français.
23-
2422]
2523```
2624
@@ -33,7 +31,6 @@ Dieser Text sollte auf Deutsch sein.
3331#block[
3432#set text(lang: "de");
3533Dieser Text sollte auf Deutsch sein.
36-
3734]
3835```
3936
@@ -45,6 +42,5 @@ This should not have lang set.
4542^D
4643#block[
4744This should not have lang set.
48-
4945]
5046```
Original file line number Diff line number Diff line change 1111+ item
1212+ item
1313+ item
14-
1514]
1615```
Original file line number Diff line number Diff line change 66^D
77#block[
88Hello
9-
109] <foo>
1110
1211```
Original file line number Diff line number Diff line change 77^D
88#block[
99test
10-
1110] #label("my label")
1211See #link(label("my label"))[my label].
1312
Original file line number Diff line number Diff line change @@ -542,7 +542,6 @@ And nested without indentation:
542542#block[
543543#block[
544544foo
545-
546545]
547546]
548547#block[
@@ -557,7 +556,6 @@ Here's a simple block:
557556
558557#block[
559558foo
560-
561559]
562560This should be a code block, though:
563561
You can’t perform that action at this time.
0 commit comments