aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-12-04 08:42:12 -0800
committerJohn MacFarlane <[email protected]>2023-12-04 08:42:12 -0800
commitdbdb4d9c1f16f57f4c66a84ed71b7837aeb69208 (patch)
treede3c1ae8cb46ff1351dbbc57606778fa881a6b02 /src
parentf8ba1280c66a10ccb0a9030de680d5abef1d62c4 (diff)
Typst writer: put inline image dimensions on enclosing box, not image.
Closes #9104.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Typst.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs
index 10948e2ab..fcdd037f2 100644
--- a/src/Text/Pandoc/Writers/Typst.hs
+++ b/src/Text/Pandoc/Writers/Typst.hs
@@ -285,10 +285,7 @@ inlineToTypst inline =
opts <- gets stOptions
let mbHeight = lookup "height" kvs
let mdWidth = lookup "width" kvs
- let coreImage = "image" <>
- parens (doubleQuoted src <>
- maybe mempty (\w -> ", width: " <> literal w) mdWidth <>
- maybe mempty (\h -> ", height: " <> literal h) mbHeight)
+ let coreImage = "image" <> parens (doubleQuoted src)
-- see #9104; we need a box or the image is treated as block-level:
case (mdWidth, mbHeight) of
(Nothing, Nothing) -> do