aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Typst.hs1
-rw-r--r--test/command/11101.md15
2 files changed, 16 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Typst.hs b/src/Text/Pandoc/Readers/Typst.hs
index cf869bd73..535038c16 100644
--- a/src/Text/Pandoc/Readers/Typst.hs
+++ b/src/Text/Pandoc/Readers/Typst.hs
@@ -396,6 +396,7 @@ blockHandlers = M.fromList
getField "body" fields >>= pWithContents pBlocks)
,("pad", \_ _ fields -> -- ignore paddingy
getField "body" fields >>= pWithContents pBlocks)
+ ,("pagebreak", \_ _ _ -> pure $ B.divWith ("", ["page-break"], [("wrapper", "1")]) B.horizontalRule)
]
inlineHandlers :: PandocMonad m =>
diff --git a/test/command/11101.md b/test/command/11101.md
new file mode 100644
index 000000000..77ce03045
--- /dev/null
+++ b/test/command/11101.md
@@ -0,0 +1,15 @@
+```
+% pandoc -f typst -t native
+First paragraph.
+
+#pagebreak()
+
+Second paragraph.
+^D
+[ Para [ Str "First" , Space , Str "paragraph." ]
+, Div
+ ( "" , [ "page-break" ] , [ ( "wrapper" , "1" ) ] )
+ [ HorizontalRule ]
+, Para [ Str "Second" , Space , Str "paragraph." ]
+]
+``` \ No newline at end of file