summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2023-10-12 22:26:19 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2023-10-12 22:26:19 -0700
commitc76fbe964d302b632e1d125b48b6025f7b888b42 (patch)
treef1b2d925dd4247290b86d8fb9c9c1defdbe4db01 /src
parentba07ec05727f8e84a9c941ec20369d1eee3f6755 (diff)
Typst writer: don't allow long heading to wrap.
Closes #9132.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index a92924aa0..6e058820c 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -98,7 +98,8 @@ blockToTypst block =
if "unlisted" `elem` cls
then literal "#heading(outlined: false)" <> brackets contents <>
cr <> lab
- else literal (T.replicate level "=") <> space <> contents <>
+ else nowrap
+ (literal (T.replicate level "=") <> space <> contents) <>
cr <> lab
RawBlock fmt str ->
case fmt of